Skip to content

Commit 6eb2981

Browse files
author
haotool
committed
fix(e2e): improve test stability with longer wait times for headless mode
1 parent 8373fe1 commit 6eb2981

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/e2e/options.spec.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,14 @@ test.describe('Options Page', () => {
5252
const newChecked = await autoCopyCheckbox.isChecked();
5353
expect(newChecked).toBe(!initialChecked);
5454

55-
// Wait for save
56-
await page.waitForTimeout(200);
55+
// Wait for save (longer timeout for headless mode)
56+
await page.waitForTimeout(500);
5757

5858
// Reload page to verify persistence
59-
await page.reload();
59+
await page.reload({ waitUntil: 'domcontentloaded' });
60+
61+
// Wait for settings to load
62+
await page.waitForTimeout(300);
6063

6164
// Verify persisted state
6265
const persistedChecked = await autoCopyCheckbox.isChecked();

0 commit comments

Comments
 (0)