Skip to content

Commit 0e0c8e7

Browse files
authored
test: give arm machines more time to load spellchecker (electron#22494)
1 parent 01c597a commit 0e0c8e7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

spec-main/spellchecker-spec.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@ describe('spellchecker', () => {
2020
await closeWindow(w)
2121
})
2222

23+
// Spellchecker loads slow on ARM CI machines.
24+
const waitTime = (process.arch === 'arm' || process.arch === 'arm64') ? 2000 : 500
25+
2326
ifit(process.platform !== 'win32')('should detect correctly spelled words as correct', async () => {
2427
await w.webContents.executeJavaScript('document.body.querySelector("textarea").value = "Beautiful and lovely"')
2528
await w.webContents.executeJavaScript('document.body.querySelector("textarea").focus()')
2629
const contextMenuPromise = emittedOnce(w.webContents, 'context-menu')
2730
// Wait for spellchecker to load
28-
await new Promise(resolve => setTimeout(resolve, 500))
31+
await new Promise(resolve => setTimeout(resolve, waitTime))
2932
w.webContents.sendInputEvent({
3033
type: 'mouseDown',
3134
button: 'right',
@@ -42,7 +45,7 @@ describe('spellchecker', () => {
4245
await w.webContents.executeJavaScript('document.body.querySelector("textarea").focus()')
4346
const contextMenuPromise = emittedOnce(w.webContents, 'context-menu')
4447
// Wait for spellchecker to load
45-
await new Promise(resolve => setTimeout(resolve, 500))
48+
await new Promise(resolve => setTimeout(resolve, waitTime))
4649
w.webContents.sendInputEvent({
4750
type: 'mouseDown',
4851
button: 'right',

0 commit comments

Comments
 (0)