Skip to content

Commit 9b4b707

Browse files
committed
chore: optimize the robustness of e2e tests
1 parent a4229c5 commit 9b4b707

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

playwright.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = defineConfig({
77
testDir: './test/e2e',
88
fullyParallel: false,
99
forbidOnly: isCI,
10-
retries: 0,
10+
retries: isCI ? 1 : 0,
1111
workers: 1,
1212
reporter: 'null',
1313
use: {

test/e2e/electron-windows.e2e.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ test.describe('test/e2e/electron-windows.e2e.test.js', () => {
2828

2929
test('loadingView option is working', async () => {
3030
const window = await electronApp.firstWindow();
31-
31+
await window.waitForLoadState('domcontentloaded');
3232
expect(await window.title()).toBe('Loading');
3333
expect(window.url()).toMatch(/renderer\/loading\.html$/);
3434
});
@@ -48,7 +48,7 @@ test.describe('test/e2e/electron-windows.e2e.test.js', () => {
4848
await wait();
4949
const window = await electronApp.firstWindow();
5050
await window.click('button#new-online');
51-
await wait();
51+
await wait(10000);
5252
const windows = electronApp.windows();
5353

5454
expect(windows.length).toBeGreaterThan(1);

0 commit comments

Comments
 (0)