Files
FFF_vtt_frozen/e2e/run.sh
T
SirStone 1dff520f31 test: TLS + HTTP/2 test vhost with the client dist served at /
The test nginx is now the production shape of DESIGN 11.1 and the browser
gate's real path (#66, spec #63 decision 6): TLS-only listener with
http2 on, a self-signed certificate generated per run (tools/tlsdev.mjs,
added to the process's default CA list so verification stays on), the
client dist at / with SPA fallback, index no-cache and a year-immutable
/assets/ cache, and the tile gate's internal /_tiles/ still unreachable.

Existing tile/doors/oneway/wallbehaviour harnesses point their server's
public origin at the https vhost, so they prove the same listener the
browser uses. tools/vhost.test.mjs is the independent node:http2 client
(cert SANs, ALPN h2, cache headers, SPA fallback, direct /_tiles/ 404);
e2e/h2.test.mjs drives devbox chromium via playwright-core and asserts
the page reports h2 (`devbox run e2e`, npm deps outside tools/).

Root devbox gains chromium + openssl. Harness builds use a worktree-local
nimcache so parallel worktrees stop corrupting each other's objects.

Refs #66
2026-11-20 23:11:05 +01:00

19 lines
872 B
Bash
Executable File

#!/usr/bin/env bash
# devbox run e2e: the headless-browser gate (TESTING 10.3). Separate from `devbox run test` so the
# fast server gate stays fast (TESTING 11.1 note in #66). Requires the root devbox's `chromium` and
# the e2e/ npm dependency (`playwright-core`); the client build test in T4+ extends this script.
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 e2e && { [ -d node_modules ] || npm ci --no-audit --no-fund; } )
node --test --test-concurrency=1 --test-reporter=spec e2e/*.test.mjs > results/e2e.log 2>&1
rc=$?
cat results/e2e.log
exit $rc