Repository navigation
End-to-end matrix for every interaction, Playwright suite, CI job and production monitor - #29
Merged
Merged
Conversation
…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.
…d card, longer wait for hand tracking
… leaderboard card, six shards
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second half of the "production ready + observable" work (the first half was #28).
The end-to-end matrix
tests/e2e-matrix.mdlists 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, failspnpm 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
pnpm e2e:build, thenpnpm 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.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.Bugs the suite found (fixed here)
data-testids; no visual change).Monitoring
Production monitorworkflow 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
.gitignorefor the e2e outputs,@playwright/test1.52.0 andwsas dev dependencies (1.52 satisfies Next's optional peer range).asl/.env, so the suite is the same everywhere.