Skip to content

qa(ui): add Playwright + axe UI/QA coverage#27

Open
UberMetroid wants to merge 1 commit into
masterfrom
qa/ui-coverage
Open

qa(ui): add Playwright + axe UI/QA coverage#27
UberMetroid wants to merge 1 commit into
masterfrom
qa/ui-coverage

Conversation

@UberMetroid

@UberMetroid UberMetroid commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds end-to-end, accessibility, and visual-regression coverage for rustle under tests/ui/. The suite is decoupled from the Cargo build: it targets the already-built rustle server at the STUDIO_URL env var (defaults to http://127.0.0.1:4502) and can be pointed at any reachable instance.

Stack

  • Playwright 1.50.1 (Chromium project only)
  • @axe-core/playwright 4.10.2
  • TypeScript 5.6 + Node 22

Tests (20 across 7 files)

  • tests/root.spec.ts — root page render, <html lang>, head wiring, raw HTTP smoke
  • tests/pwa-manifest.spec.ts/assets/manifest.json shape, <link rel="manifest">, icons
  • tests/service-worker.spec.ts/assets/service-worker.js content + browser registration
  • tests/pin-verify.spec.ts/api/pin-required, happy path, wrong path, UI form (auto-skips when no PIN is configured)
  • tests/game-round.spec.ts — full round: click A P P L E on the on-screen keyboard, observe tile states, verify keyboard feedback
  • tests/accessibility.spec.ts — axe scans on root and #game-grid, keyboard reachability
  • tests/visual-grid.spec.ts — full-page screenshot of the starting grid as a baseline

CI

  • .github/workflows/qa-ui.yml builds the same Alpine image (Containerfile) used by production, runs it on localhost:4502 with RUSTLE_PIN=1234, then runs the Playwright suite against it. Uploads playwright-report/ + test-results/ as artifacts on failure.

What this PR does not change

  • No application source changes — everything is isolated under tests/ui/ + one new workflow file.

See tests/ui/README.md for layout, env vars, snapshot regeneration, and known limitations.

Verification

  • npm install completes (10 packages).
  • npx playwright install chromium succeeds (Fedora 44 -> Chromium 1155 fallback build).
  • npx tsc --noEmit exits 0.
  • npx playwright test --list enumerates all 20 tests.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant