Pre-flight Checks
Problem Description
The project currently lacks end-to-end tests. We have unit tests (Rust cargo test) and frontend component tests (Vitest), but no automated way to verify complete user flows such as: creating a new game, selecting a league, choosing a team, and advancing turns. This makes it difficult to catch regressions when refactoring critical paths like start_new_game or the world loading pipeline.
Proposed Solution
Add Playwright as the E2E testing framework, configured to launch the Tauri app and simulate real user interactions. The initial test suite should cover the core onboarding flow:
- New Game flow: Fill manager form -> select league LEC -> navigate to team selection
- Team Selection: Verify teams are displayed with correct logos and OVRs
- Game Start: Select a team -> verify the dashboard loads with correct team data
- Turn Advancement: Advance one week -> verify calendar, standings, and notifications update
The tests should use fixtures to speed up execution (skip the onboarding for repeated runs), and run in headless mode for CI.
Affected Area
Other (testing infrastructure)
Alternatives Considered
- Cypress: More mature but heavier and less Tauri-friendly than Playwright
- WebDriverIO: More complex setup, less suited for Tauri webview
- Manual testing: Current approach, not scalable
Additional Context
Playwright is the recommended choice for Tauri v2 apps because it natively supports webview automation, has excellent wait strategies, and integrates well with CI pipelines.
The Tauri test utility (@tauri-apps/test) will scaffold the Playwright configuration. We should also consider:
- Running tests in CI (GitHub Actions) with webkit and chromium browsers
- Adding a npm run test:e2e script
- Keeping tests isolated with a fresh world seed per test run
Pre-flight Checks
Problem Description
The project currently lacks end-to-end tests. We have unit tests (Rust cargo test) and frontend component tests (Vitest), but no automated way to verify complete user flows such as: creating a new game, selecting a league, choosing a team, and advancing turns. This makes it difficult to catch regressions when refactoring critical paths like start_new_game or the world loading pipeline.
Proposed Solution
Add Playwright as the E2E testing framework, configured to launch the Tauri app and simulate real user interactions. The initial test suite should cover the core onboarding flow:
The tests should use fixtures to speed up execution (skip the onboarding for repeated runs), and run in headless mode for CI.
Affected Area
Other (testing infrastructure)
Alternatives Considered
Additional Context
Playwright is the recommended choice for Tauri v2 apps because it natively supports webview automation, has excellent wait strategies, and integrates well with CI pipelines.
The Tauri test utility (@tauri-apps/test) will scaffold the Playwright configuration. We should also consider: