Add spec for interaction event with escape item
This commit is contained in:
parent
bbadeb62ac
commit
74a3a34caa
2 changed files with 16 additions and 3 deletions
|
@ -90,5 +90,17 @@ describe('TouchBar module', function () {
|
|||
window.setTouchBar(touchBar)
|
||||
window.emit('-touch-bar-interaction', {}, button.id)
|
||||
})
|
||||
|
||||
it('calls the callback on the escape item when a window interaction event fires', function (done) {
|
||||
const button = new TouchBarButton({
|
||||
label: 'bar',
|
||||
click: () => {
|
||||
done()
|
||||
}
|
||||
})
|
||||
const touchBar = new TouchBar({escapeItem: button})
|
||||
window.setTouchBar(touchBar)
|
||||
window.emit('-touch-bar-interaction', {}, button.id)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue