super-productivity/e2e/utils
Johannes Millan a49a863a08 test(e2e): improve sync test robustness with archive persistence waits
Adds explicit waits after archive operations to ensure IndexedDB writes
complete before proceeding with sync operations. This prevents race
conditions where sync attempts to read state before archive persistence
finishes.

Changes:
- Add waitForArchivePersistence() helper to sync-helpers.ts
  - Waits 1000ms for IndexedDB operations to complete
  - Additional 100ms for pending micro-tasks/animations
- Add 500ms waits in waitForSyncComplete() after detecting sync success
  - Ensures IndexedDB writes fully settle before returning
- Apply waitForArchivePersistence() in webdav-sync-archive.spec.ts
  - After Client A archives Task1
  - After Client B archives Task3
- Apply waitForArchivePersistence() in webdav-sync-delete-cascade.spec.ts
  - After Client A archives task (tag deletion test)
  - After Client B archives Task1 (concurrent archive test)

These changes address flakiness in CI environments where async IndexedDB
operations may not complete before the next test assertion.

Related to: Bug #5995, Bug #6044 (focus-mode test fixes)
2026-01-20 17:07:24 +01:00
..
assertions.ts refactor(e2e): simplify improvements per KISS/YAGNI review 2026-01-06 12:46:20 +01:00
check-webdav.ts test(e2e): try to fix e2e tests 2025-12-10 21:26:48 +01:00
e2e-constants.ts perf(e2e): optimize polling intervals in helpers 2026-01-18 15:58:46 +01:00
element-helpers.ts refactor(e2e): extract ensureGlobalAddTaskBarOpen helper to reduce code duplication 2026-01-16 13:35:59 +01:00
index.ts refactor(e2e): simplify improvements per KISS/YAGNI review 2026-01-06 12:46:20 +01:00
legacy-migration-helpers.ts test(e2e): add legacy migration sync tests for WebDAV and SuperSync 2026-01-13 18:26:45 +01:00
schedule-task-helper.ts refactor(e2e): replace waitForTimeout with condition-based waits 2026-01-03 15:29:38 +01:00
supersync-assertions.ts fix(e2e): improve test stability for parallel execution 2026-01-04 17:35:47 +01:00
supersync-helpers.ts fix(e2e): wait for dialog close animation in deleteTask helper 2026-01-19 12:09:50 +01:00
sync-helpers.ts test(e2e): improve sync test robustness with archive persistence waits 2026-01-20 17:07:24 +01:00
time-input-helper.ts refactor(e2e): replace waitForTimeout with condition-based waits 2026-01-03 15:29:38 +01:00
tour-helpers.ts fix(e2e): dismiss Welcome intro dialog before Shepherd tour 2026-01-09 18:28:18 +01:00
waits.ts test: fix supersync tests 2026-01-11 15:28:50 +01:00