mirror of
https://github.com/electron/electron.git
synced 2026-01-29 09:18:18 -05:00
wait for window to be focused in openDevTools test
This commit is contained in:
@@ -264,7 +264,9 @@ describe('webContents module', () => {
|
||||
|
||||
describe('openDevTools() API', () => {
|
||||
it('can show window with activation', async () => {
|
||||
const focused = emittedOnce(w, 'focus')
|
||||
w.show()
|
||||
await focused
|
||||
assert.strictEqual(w.isFocused(), true)
|
||||
const devtoolsOpened = emittedOnce(w.webContents, 'devtools-opened')
|
||||
w.webContents.openDevTools({ mode: 'detach', activate: true })
|
||||
|
||||
Reference in New Issue
Block a user