# Playwright E2E. Brings up the app + a Playwright runner and exercises the live pages (design # system, theme switch, mobile layout, CSRF, landing, 404, plugin gating) — Ory-free, so it's fast. # docker compose -f compose.yml -f e2e-tests/compose.visual.yml run --build --rm e2e # docker compose -f compose.yml -f e2e-tests/compose.visual.yml down -v # tear down after # --build rebuilds the runner (the image bakes in e2e-tests/) so spec edits are picked up. # Screenshots + HTML report land in ./e2e-tests/artifacts/ (git-ignored). services: web: # The dashboard renders mock data — no Ory needed. Drop the base file's kratos/keto # dependency so the visual suite stays fast and doesn't boot Postgres + the Ory stack. depends_on: !reset [] # Dev throwaways are fine for tests; cache templates for production-like rendering. environment: APP_URL: http://web:3000 # the suite reaches web on this host → canonical-host redirect stays inert CACHE_TEMPLATES: "true" REQUIRE_SECURE_SECRETS: "false" SECURE_COOKIES: "false" # the suite hits web over http — Secure cookies wouldn't be stored healthcheck: test: ["CMD", "wget", "-q", "-O", "-", "http://localhost:3000/public/css/styles.css"] interval: 2s timeout: 4s retries: 15 # plugins/ is empty in the image; bind the reference example in as the `scheduling` plugin so the # nav-gating spec has a drop-in plugin to assert against. volumes: - ./examples/plugins/scheduling:/app/plugins/scheduling:ro e2e: build: context: . dockerfile: e2e-tests/Dockerfile # Just the Ory-free visual suite; the full-stack auth spec runs via e2e-tests/compose.auth.yml. command: ["npx", "playwright", "test", "visual.spec.ts"] depends_on: web: condition: service_healthy environment: BASE_URL: http://web:3000 volumes: # The committed dev tokenizer key — the spec signs a session JWT with it so the gated # dashboard renders; web verifies it with the same key (the file it mounts read-only). - ./ory/kratos/tokenizer/jwks.json:/repo/jwks.json:ro - ./e2e-tests/artifacts:/e2e-tests/artifacts