Skip to content

feat(e2e): add end-to-end tests with Playwright #217

Description

@NicoRuedaA

Pre-flight Checks

  • I have searched existing issues and this is not a duplicate
  • I understand this issue needs status:approved before a PR can be opened

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:

  1. New Game flow: Fill manager form -> select league LEC -> navigate to team selection
  2. Team Selection: Verify teams are displayed with correct logos and OVRs
  3. Game Start: Select a team -> verify the dashboard loads with correct team data
  4. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions