Files
crosscode-platform/apps/website/playwright.config.ts
T
joshuaandClaude Opus 5.5 84c5b0c08e feat(website): the admin, with drafts, preview, publish and restore
Admin API and screens: dashboard and setup checklist, template and
style, pages and blocks, ministries, leadership, media library with
the storage limit, publish and history. Pending changes with who and
when, discard one, one Publish, restore any version (each version
keeps the working copy's rows, never sent to visitors). Preview on
the site's own addresses with a bar (widths, back, publish); shared
preview links for 7 days or until revoked. Roles checked, same-origin
changes only. Publish refreshes the public pages at once
(WEBSITE_CONTENT_CACHE_SECONDS). E2E on a production build: the
admin's flows and axe on every screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 12:30:29 +02:00

36 lines
1.3 KiB
TypeScript

import { defineConfig, devices } from "@playwright/test";
// The Website end to end (docs/WEBSITE-1.0-PLAN.md §13): the real backend on an in-memory database
// with the demo church (e2e/server.ts), and the Next.js pages (a production build). Run with `npx playwright test` in
// apps/website. Nothing needs a database.
export default defineConfig({
testDir: "./e2e",
testMatch: "**/*.spec.ts",
workers: 1,
fullyParallel: false,
timeout: 120_000,
expect: { timeout: 20_000 },
reporter: "list",
outputDir: "e2e/test-results",
use: { baseURL: "http://localhost:3310", trace: "retain-on-failure", navigationTimeout: 90_000 },
projects: [{ name: "chromium", use: { ...devices["Desktop Chrome"] } }],
webServer: [
{
command: "npx tsx e2e/server.ts",
url: "http://127.0.0.1:5310/api/health",
timeout: 120_000,
reuseExistingServer: false,
stdout: "pipe",
},
{
// A production build, as churches run it (next dev's Fast Refresh remounts pages mid-test).
command: "npx next build && npx next start -p 3310",
cwd: "frontend",
url: "http://localhost:3310/robots.txt",
timeout: 300_000,
reuseExistingServer: false,
env: { WEBSITE_API_URL: "http://127.0.0.1:5310", WEBSITE_CONTENT_CACHE_SECONDS: "0" },
},
],
});