Skip to content

End-to-end matrix for every interaction, Playwright suite, CI job and production monitor - #29

Merged
MsMarion merged 9 commits into
mainfrom
feature/e2e-matrix-and-monitor
Oct 18, 2026
Merged

MsMarion merged 9 commits into
mainfrom
feature/e2e-matrix-and-monitor

Conversation

@MsMarion

Copy link
Copy Markdown
Owner

Second half of the "production ready + observable" work (the first half was #28).

The end-to-end matrix

tests/e2e-matrix.md lists every page and interaction in the production build, what is expected, and the ID of the browser test that proves it (92 rows: global chrome, home, Whack-A-Sign, leaderboard and report, sign in, hero name, profile, song empty/error states, routes closed in production, media, health, error reporting, debug panel, tickets). A row without a test, or a test without a row, fails pnpm e2e:matrix (run by CI). The things that cannot be automated (Google sign-in, a real hand, song media, phone layouts) are listed with how they are checked instead.

The suite

  • Playwright against a production build (pnpm e2e:build, then pnpm e2e) in real Chrome with a fake camera, a throwaway database (signhero_e2e, wiped and seeded with known leaderboard/report rows each run, refuses to run on any database without "e2e" in its name), and a mock detection server (asl/e2e/support/mock-backend.mjs) that speaks the real protocol and can be told to drop the socket, go down, require tickets, or report a chosen letter. That is how camera denied / no camera / in use, detection offline / reconnecting, a held sign scoring, and ticket enforcement are all reproducible.
  • Three tests play a real 30-second game (guest, signed in, and with the save failing), so a full run is about 12 minutes locally. New CI job end-to-end (real browser, every page) runs it on every pull request and keeps the report, traces and screenshots for 14 days. It is not a required check yet; I would add it to branch protection after a few stable runs.
  • Local result before opening this PR: all 92 rows pass.

Bugs the suite found (fixed here)

  • Creating an account from the sign-up form never signed you in. After registering, the form called its own submit handler again in register mode, which tried to register the same address a second time and showed "Account with this email already exists". A new player had to go back and sign in by hand. Fixed (the sign-in is now a separate step); covered by A-03.
  • Smaller things the test ids exposed: the navbar and error elements had nothing to hang a test on (added data-testids; no visual change).

Monitoring

Production monitor workflow runs every 15 minutes (and on demand) against the public URLs only, no secrets: deep health (site, database, GPU backend on the GPU) with retries, the detection server's counters in the run summary, and a detection round trip (the smoke test without a browser). A failure turns the run red and GitHub emails the repository watchers.

Other

  • .gitignore for the e2e outputs, @playwright/test 1.52.0 and ws as dev dependencies (1.52 satisfies Next's optional peer range).
  • The e2e build ignores any Google credentials in a developer's asl/.env, so the suite is the same everywhere.

…ion monitor

tests/e2e-matrix.md lists every page and interaction (92 rows) with the id of the browser
test that proves it; pnpm e2e:matrix fails if a row or a test is missing. The suite drives
a production build in Chrome against a mock detection server and a throwaway database, and
reproduces camera, connection and ticket states on demand.

It found that creating an account from the sign-up form never signed the player in (the
success handler re-ran the form in register mode); fixed. The sign-in page, navbar and
Whack-A-Sign gain test ids.

CI gets an end-to-end job; a scheduled workflow checks production health every 15 minutes.
…g, sturdier waits

The trace of a failing run showed MediaPipe's WebGL context appearing 30 seconds after the game
started and then stalling on GPU reads, which froze the page timers (a 3 second countdown took
about a minute). The CI build now sends empty frames over the same protocol; locally and in
production the real MediaPipe path runs. Also: the debug-panel test no longer tries to catch a
sub-second reconnect, and the CI test timeout grows to 4 minutes.
@MsMarion
MsMarion merged commit 9e1e9c0 into main Oct 18, 2026
9 checks passed
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