New `client/` package (Vite + TypeScript + PixiJS v8, plain DOM overlay): the pure reducer seam (no Pixi import), an append-only slice registry build-time glob, the `proto` 2 WS client with envelope/ack/closing mapping, the sign-in door (`POST /join`, one "Key not recognised." for wrong and unknown), the DOM shell/HUD and a minimal Pixi stage created only after a live `hello`. `hello` resets every slice so a reconnect cannot show stale state; `proto-mismatch` shows reload; `revoked` returns to the sign-in page and stops. The browser e2e moves into the client package (`client/e2e/`, owning playwright-core) and runs the real Vite build through the TLS/HTTP2 test nginx: join -> canvas -> hello/roster for GM and player, no data before join, identical wrong/unknown key refusal, proto mismatch, revoked. `devbox run client-test` adds the Vitest seam; `devbox run e2e` builds the client first. The #66 stub dist stays local to `tools/vhost.test.mjs`, so `devbox run test` still needs no npm install. Refs #67
21 lines
937 B
Bash
Executable File
21 lines
937 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# devbox run e2e: the headless-browser gate (TESTING 10.3). Builds the real client, then runs the
|
|
# browser suite against the real server through the TLS/HTTP2 test nginx. Separate from
|
|
# `devbox run test` so the fast server gate stays fast (TESTING 11.1); the client's own unit tests
|
|
# are `devbox run client-test`.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/../.." || exit 1
|
|
mkdir -p results
|
|
export CHROMIUM="${CHROMIUM:-$(command -v chromium || true)}"
|
|
if [ -z "$CHROMIUM" ]; then
|
|
echo "e2e: chromium not found; it is a root devbox package (devbox.json) - run inside devbox" >&2
|
|
exit 1
|
|
fi
|
|
# npm deps stay out of tools/ (TESTING 10.4) and out of git; install once per checkout.
|
|
( cd client && { [ -d node_modules ] || npm ci --no-audit --no-fund; } )
|
|
( cd client && npm run build )
|
|
node --test --test-concurrency=1 --test-reporter=spec client/e2e/*.test.mjs > results/e2e.log 2>&1
|
|
rc=$?
|
|
cat results/e2e.log
|
|
exit $rc
|