fix: ensure that the window is focused when testing spellchecker
This commit is contained in:
parent
2b8ef344b7
commit
2420cdf027
1 changed files with 2 additions and 0 deletions
|
@ -149,6 +149,8 @@ describe('webFrame module', function () {
|
||||||
w = new BrowserWindow({ show: false })
|
w = new BrowserWindow({ show: false })
|
||||||
w.loadFile(path.join(fixtures, 'pages', 'webframe-spell-check.html'))
|
w.loadFile(path.join(fixtures, 'pages', 'webframe-spell-check.html'))
|
||||||
await emittedOnce(w.webContents, 'did-finish-load')
|
await emittedOnce(w.webContents, 'did-finish-load')
|
||||||
|
w.focus()
|
||||||
|
await w.webContents.executeJavaScript('document.querySelector("input").focus()', true)
|
||||||
|
|
||||||
const spellCheckerFeedback = emittedOnce(ipcMain, 'spec-spell-check')
|
const spellCheckerFeedback = emittedOnce(ipcMain, 'spec-spell-check')
|
||||||
const misspelledWord = 'spleling'
|
const misspelledWord = 'spleling'
|
||||||
|
|
Loading…
Reference in a new issue