Fix E2E test reliability issues and stale data bugs
- Fix race conditions: Set workers: 1 since all tests share test user state - Fix stale data: GET /api/user and /api/cycle/current now fetch fresh data from database instead of returning stale PocketBase auth store cache - Fix timing: Replace waitForTimeout with retry-based Playwright assertions - Fix mobile test: Use exact heading match to avoid strict mode violation - Add test user setup: Include notificationTime and update rule for users All 1014 unit tests and 190 E2E tests pass. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -22,8 +22,9 @@ export default defineConfig({
|
||||
// Retry failed tests on CI only
|
||||
retries: process.env.CI ? 2 : 0,
|
||||
|
||||
// Limit parallel workers on CI to avoid resource issues
|
||||
workers: process.env.CI ? 1 : undefined,
|
||||
// Run tests sequentially since all tests share the same test user
|
||||
// Parallel execution causes race conditions when tests modify user state
|
||||
workers: 1,
|
||||
|
||||
// Reporter configuration
|
||||
reporter: [["html", { open: "never" }], ["list"]],
|
||||
|
||||
Reference in New Issue
Block a user