Skip to content

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

Open
UberMetroid wants to merge 3 commits into
masterfrom
qa/ui-coverage
Open

qa(ui): add Playwright + axe UI/QA coverage#27
UberMetroid wants to merge 3 commits 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.

opencode and others added 3 commits July 26, 2026 22:06
Replace the ad-hoc (unconstrained) rule set with a consistent policy
across the UI/QA suite:

  * tag set   : wcag2a + wcag2aa + wcag21aa + best-practice
                (most restrictive reasonable configuration; previously
                used axe defaults, which include every rule)
  * severity  : critical / serious -> hard failure
                moderate / minor   -> warning only (logged +
                test annotation; does not fail the suite)
  * disabled  : color-contrast (dark-theme palette surfaces fall
                below the 3:1 minimum required by WCAG 1.4.11),
                region (single-board shell whose root is a <div> for
                the grid; axe flags content not wrapped in landmark
                elements; documented inline at the top of the spec)

Each spec now leads with a header block listing disabled rules and
rationale, so future contributors can re-enable a rule with the
threshold it must meet.
@UberMetroid

Copy link
Copy Markdown
Collaborator Author

qa(ui): tighten accessibility rules to most-restrictive axe tag set

New commit on qa/ui-coverage aligns the UI/QA suite with the rest of the studio2201 accessibility policy.

Policy

  • Tag set: wcag2a + wcag2aa + wcag21aa + best-practice (most restrictive reasonable).
  • Severity: critical / serious -> hard failure. moderate / minor -> warning only (logged + test.info().annotations; does not fail the suite).
  • Disabled rules are documented in a header comment block at the top of the spec, with the rationale and the threshold that must be met before re-enabling.

Per-repo details (disabled rules, rationale, behavioural change vs. previous version) are in the commit message.

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