super-productivity/e2e/tests/focus-mode
Johannes Millan 66a0ab856e fix(e2e): fix focus-mode test failures and incorrect expectations
Bug #5995 test was failing due to improper setup - not using page objects
and waiting for app readiness. Bug #6044 tests had incorrect expectations
about when long breaks occur in the Pomodoro cycle.

Root Cause Analysis:
- Bug #5995: Test navigated manually without using workViewPage fixture
- Bug #6044: Tests expected long breaks after sessions 4 & 8, but the
  correct logic is after sessions 3 & 7 (when cycle becomes 4 & 8)

Pomodoro Cycle Logic:
- Initial state: cycle = 1
- After session 1: cycle = 2 → short break
- After session 2: cycle = 3 → short break
- After session 3: cycle = 4 → LONG break (4 % 4 === 0)
- After session 4: cycle = 5 → short break
- Pattern: S S L S S S L S (not S S S L S S S L)

Changes:
- bug-5995: Use workViewPage fixture and proper navigation
- bug-6044: Fix all 4 tests to expect long breaks at correct sessions
- bug-6044: Fix completeSession helper to wait for break screen
- bug-6044: Update test descriptions and patterns to match reality

Test Results:
- All 5 focus-mode e2e tests now passing
- No code changes needed - underlying bug fixes were correct
2026-01-20 17:07:24 +01:00
..
bug-5995-break-resume.spec.ts fix(e2e): fix focus-mode test failures and incorrect expectations 2026-01-20 17:07:24 +01:00
flowtime-timer-bug-5117.spec.ts test(e2e): fix flaky focus mode tests 2026-01-16 22:34:50 +01:00
pomodoro-break-timing-bug-6044.spec.ts fix(e2e): fix focus-mode test failures and incorrect expectations 2026-01-20 17:07:24 +01:00
pomodoro-timer-sync-bug-5954.spec.ts test(e2e): fix flaky Pomodoro focus mode test 2026-01-17 15:53:27 +01:00
pomodoro-timer-sync-bug-5974.spec.ts fix(repeat): add event loop yield and isPaused filter (#5976) 2026-01-13 18:26:45 +01:00