From 7e312c81cabeed74fbd4586685cc151e3841a9e6 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 10 Oct 2023 17:13:07 +0200 Subject: [PATCH] test: make capturePage color matching timeouts consistent (#40158) --- spec/api-browser-window-spec.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/api-browser-window-spec.ts b/spec/api-browser-window-spec.ts index b9519f8d6c36..2fb6cb00086f 100644 --- a/spec/api-browser-window-spec.ts +++ b/spec/api-browser-window-spec.ts @@ -6357,7 +6357,7 @@ describe('BrowserWindow module', () => { foregroundWindow.loadFile(path.join(__dirname, 'fixtures', 'pages', 'css-transparent.html')); await once(ipcMain, 'set-transparent'); - await setTimeout(); + await setTimeout(1000); const screenCapture = await captureScreen(); const centerColor = getPixelColor(screenCapture, { x: display.size.width / 2, @@ -6380,7 +6380,7 @@ describe('BrowserWindow module', () => { await once(window, 'show'); await window.webContents.loadURL('data:text/html,'); - await setTimeout(500); + await setTimeout(1000); const screenCapture = await captureScreen(); const centerColor = getPixelColor(screenCapture, { x: display.size.width / 2, @@ -6410,6 +6410,7 @@ describe('BrowserWindow module', () => { w.loadURL('about:blank'); await once(w, 'ready-to-show'); + await setTimeout(1000); const screenCapture = await captureScreen(); const centerColor = getPixelColor(screenCapture, { x: display.size.width / 2,