Skip to content

Commit

Permalink
test: make capturePage color matching timeouts consistent (#40158)
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere authored and pull[bot] committed Mar 27, 2024
1 parent bac6dfd commit 1150810
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spec/api-browser-window-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 1150810

Please sign in to comment.