test: make capturePage color matching timeouts consistent (#40158)
This commit is contained in:
parent
86df4db6f1
commit
7e312c81ca
1 changed files with 3 additions and 2 deletions
|
@ -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,<head><meta name="color-scheme" content="dark"></head>');
|
||||
|
||||
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,
|
||||
|
|
Loading…
Reference in a new issue