test(offline): mock e2e for a device-local vs_ai game (C8) #206
Reference in New Issue
Block a user
Delete Branch "feature/offline-mock-e2e"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fast-follow (c) from the offline plan: a Playwright mock e2e that auto-covers the whole offline / local-game flow (previously only contour-verified + unit-covered).
What the spec does (
e2e/offline.spec.ts, both Chromium + WebKit):matchMediastub) so the Settings offline toggle is offered.NEWYMAO), taps out the opening WAY across the centre, and watches the local robot reply with a real move.Enabling infra — all e2e-only, nothing enters the production build:
mock/client.tsfetchDictnow serves the per-variant dawgs from the preview build/e2edict/(was: threw).scripts/e2e-dict.mjscopies the real dawgs intodist-e2e/fromE2E_DICT_DIR;playwright.configruns it between build and preview. TheuiCI job fetches the scrabble-dictionary release the same way the Go jobs do; locally it defaults to the siblingscrabble-solver/dawg. Dawgs are never committed (dist-e2e/is gitignored) and are tree-shaken / absent from the prod build.localgame/id.tssetForcedSeed+gateway.tswindow.__mock.setLocalSeed: a mock-only seed seam (tree-shaken from prod).docs/TESTING.mddocuments it.Verified local: check 0 / unit 482 / e2e 198 (Chromium+WebKit) / app entry 113.8/114 KB.