fix: close context menu before popup (#17474)
This commit is contained in:
parent
d2ad8efef4
commit
49f13e38f9
2 changed files with 21 additions and 0 deletions
|
@ -24,6 +24,23 @@ describe('tray module', () => {
|
|||
})
|
||||
})
|
||||
|
||||
describe('tray.popUpContextMenu', () => {
|
||||
before(function () {
|
||||
if (process.platform !== 'win32') {
|
||||
this.skip()
|
||||
}
|
||||
})
|
||||
|
||||
it('can be called when menu is showing', (done) => {
|
||||
tray.setContextMenu(Menu.buildFromTemplate([{ label: 'Test' }]))
|
||||
setTimeout(() => {
|
||||
tray.popUpContextMenu()
|
||||
done()
|
||||
})
|
||||
tray.popUpContextMenu()
|
||||
})
|
||||
})
|
||||
|
||||
describe('tray.setImage', () => {
|
||||
it('accepts empty image', () => {
|
||||
tray.setImage(nativeImage.createEmpty())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue