Skip to content

[High] Expand Playwright end-to-end coverage to the critical journeys with a reusable wallet fixture #515

Description

@james2177

Category: Testing, Design System & Community Tooling

Description: Only two e2e specs exist (command-palette, swap-happy-path) and the Freighter bridge mock lives inline in one spec. Extract a shared fixture and add journeys for solver registration, accept intent, My Intents, Explore filters/URL state, governance and error/offline states.

Problem Statement & Context: Integration tests (Vitest) cover logic but not real browser behaviour: focus, routing, CSP, WebSocket lifecycle, storage. The highest-value flows should be verified in real browsers, since regressions there directly cost users money.

Scope & Acceptance Criteria:

  • e2e/fixtures/{wallet,api,ws}.ts exposing mockFreighter, account/network switching, signing outcomes (approve/reject/timeout) and integration with the shared MSW handlers.
  • New specs (each with happy and unhappy paths): solver registration wizard, accept intent (including conflict), Explore filter/search/URL restoration and virtual list keyboard navigation, My Intents (connect gating, export), governance browse + vote (mock), offline banner and recovery, network mismatch blocking, locale switch persistence.
  • Stable selectors using roles/labels (no CSS selectors), test.step structure, trace-on-first-retry, and a11y assertions (axe) in key steps; total runtime budget < 6 min sharded.
  • CSP violation listener fails tests on any securitypolicyviolation event.
  • Out of scope: real wallet extensions or mainnet interactions.

Implementation Guidelines (Suggested Execution):

  1. Key Files/Modules: e2e/*, playwright.config.ts, src/mocks/*, docs/testing.md.
  2. Design/Architecture: Page-object-lite helpers per feature; fixtures via test.extend.
  3. Edge Cases/Constraints: WebSocket mocking via page.routeWebSocket, Firefox/WebKit differences, clock control (page.clock), avoiding flaky waits.
  4. Testing: Run the suite 10× locally for flake assessment (report in the PR); Chromium on PRs, full matrix nightly.

Definition of "Done": Baseline DoD, plus coverage matrix (journey × browser) in docs/testing.md.

Resources: Playwright fixtures and routeWebSocket docs, existing e2e specs.

Complexity: High (200 points)

Baseline Definition of Done (applies to every Wave issue)

Each issue's own "Definition of Done" is in addition to this baseline:

  • Code, tests and documentation are included in one PR that references the issue.
  • npm run lint, npm run typecheck, npm test, npm run check:i18n and npm run check:editorconfig pass locally and in CI. (If a command is broken by pre-existing repo debris, see the Repository Health & Build Integrity issues — do not silence the check; note the blocker in the PR.)
  • No new any, no // @ts-ignore / eslint-disable without a justification comment, and no new console.* (use secureLogger from src/lib/secureLogging.ts).
  • All new user-facing strings go through the i18n catalog (src/lib/i18n/messages/en.ts and es.ts).
  • New interactive UI is keyboard-operable, has visible focus, correct ARIA semantics, and works in both the dark and light palettes defined in src/app/globals.css.
  • UI changes include before/after screenshots (desktop and ~400px mobile). Behaviour changes include a short screen recording or test output.
  • Relevant docs under docs/ (and README.md if routes/scripts/env vars change) are updated.
  • The PR is reviewed and approved by a maintainer listed in .github/CODEOWNERS.

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

    complexity: highHigh complexity Drips Wave issue (200 points)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions