Skip to content

Commit 00b7127

Browse files
committed
Improve flaky test by waiting for dom content
1 parent 0c27f0a commit 00b7127

File tree

1 file changed

+2
-1
lines changed
  • test/window-integration-tests

1 file changed

+2
-1
lines changed

test/window-integration-tests/test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { _electron: electron } = require('playwright');
1+
const {_electron: electron} = require('playwright');
22
const libnut = require("../..");
33
const {POS_X, POS_Y, WIDTH, HEIGTH, TITLE} = require("./constants");
44

@@ -16,6 +16,7 @@ beforeEach(async () => {
1616
app = await electron.launch({args: ['main.js']});
1717
page = await app.firstWindow({timeout: APP_TIMEOUT});
1818
windowHandle = await app.browserWindow(page);
19+
await page.waitForLoadState("domcontentloaded");
1920
await windowHandle.evaluate((win) => {
2021
win.minimize();
2122
win.restore();

0 commit comments

Comments
 (0)