super-productivity/e2e/utils
Johannes Millan 238b91aa59
test(e2e): accept beforeunload prompt in shared dialog fallback (#9122)
The USE_REMOTE crash-resume spec reloads Client B mid-sync. While
isSyncInProgress is set, startup.service's beforeunload handler calls
preventDefault(), so Chrome raises a beforeunload prompt (the preceding
button click supplies the user activation it requires). Playwright
auto-accepts such prompts only when no 'dialog' listener is registered —
but installDevErrorDialogHandler registers one on every page and early-
returned on beforeunload, leaving the prompt unanswered. The navigation
then never starts and reload() times out (observed on SuperSync shard
6/6; the earlier load→domcontentloaded de-flake could not help because
navigation is blocked before any lifecycle event).

Accept beforeunload in the shared fallback, restoring Playwright's
default; other dialog types keep flowing to spec-specific handlers.
Corrects the two crash-resume comments that encoded the wrong theory.
2026-07-17 17:34:29 +02:00
..
assertions.ts refactor(e2e): simplify improvements per KISS/YAGNI review 2026-01-06 12:46:20 +01:00
check-webdav.ts test(e2e): harden failure signals and provider gates (#7753) 2026-05-23 20:33:04 +02:00
config-helpers.ts fix(sync): harden vector clock sanitization and improve E2E test robustness 2026-02-12 16:27:56 +01:00
e2e-constants.ts perf(e2e): optimize polling intervals in helpers 2026-01-18 15:58:46 +01:00
element-helpers.ts feat(tasks): redesign add-task-bar layout, toggles, note field & a11y (#8812) 2026-07-07 16:26:36 +02:00
index.ts feat(shepherd): remove all tours except keyboard navigation 2026-03-22 17:00:42 +01:00
legacy-migration-helpers.ts test(e2e): dismiss devError native dialogs so sync tests don't hang 2026-05-23 23:13:09 +02:00
recurring-task-helpers.ts Update recurrent task calendar and general calendar design (#8017) 2026-06-09 16:30:22 +02:00
runtime-errors.ts test(e2e): accept beforeunload prompt in shared dialog fallback (#9122) 2026-07-17 17:34:29 +02:00
schedule-task-helper.ts chore(ui): removes dead components and features [#8260 - Tier A] (#8889) 2026-07-10 11:40:35 +02:00
supersync-assertions.ts test(e2e): fix failing WebDAV and SuperSync E2E tests 2026-03-23 11:07:25 +01:00
supersync-helpers.ts fix(sync): dedupe surgical-sync retries and keep the import author through pruning (#9089) 2026-07-17 00:46:01 +02:00
sync-helpers.ts test(e2e): dismiss devError native dialogs so sync tests don't hang 2026-05-23 23:13:09 +02:00
time-input-helper.ts refactor(e2e): replace waitForTimeout with condition-based waits 2026-01-03 15:29:38 +01:00
waits.ts test(e2e): harden failure signals and provider gates (#7753) 2026-05-23 20:33:04 +02:00