chore: improve smoke test for tray (#19991)
This commit is contained in:
parent
7d4e0ad7b0
commit
81e6f317c9
1 changed files with 14 additions and 2 deletions
|
@ -918,10 +918,17 @@ app.on('ready', () => {
|
||||||
{ label: 'Item3', type: 'radio', checked: true },
|
{ label: 'Item3', type: 'radio', checked: true },
|
||||||
{ label: 'Item4', type: 'radio' }
|
{ label: 'Item4', type: 'radio' }
|
||||||
])
|
])
|
||||||
|
|
||||||
|
appIcon.setTitle('title')
|
||||||
appIcon.setToolTip('This is my application.')
|
appIcon.setToolTip('This is my application.')
|
||||||
appIcon.setContextMenu(contextMenu)
|
|
||||||
appIcon.setImage('/path/to/new/icon')
|
appIcon.setImage('/path/to/new/icon')
|
||||||
|
appIcon.setPressedImage('/path/to/new/icon')
|
||||||
|
|
||||||
appIcon.popUpContextMenu(contextMenu, { x: 100, y: 100 })
|
appIcon.popUpContextMenu(contextMenu, { x: 100, y: 100 })
|
||||||
|
appIcon.setContextMenu(contextMenu)
|
||||||
|
|
||||||
|
appIcon.setIgnoreDoubleClickEvents(true)
|
||||||
|
|
||||||
appIcon.on('click', (event, bounds) => {
|
appIcon.on('click', (event, bounds) => {
|
||||||
console.log('click', event, bounds)
|
console.log('click', event, bounds)
|
||||||
|
@ -933,7 +940,12 @@ app.on('ready', () => {
|
||||||
|
|
||||||
appIcon.displayBalloon({
|
appIcon.displayBalloon({
|
||||||
title: 'Hello World!',
|
title: 'Hello World!',
|
||||||
content: 'This the the balloon content.'
|
content: 'This the the balloon content.',
|
||||||
|
iconType: 'error',
|
||||||
|
icon: 'path/to/icon',
|
||||||
|
respectQuietTime: true,
|
||||||
|
largeIcon: true,
|
||||||
|
noSound: true
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue