riprap-nyc / web /sveltekit /playwright.config.ts
seriffic's picture
Frontend overhaul: Lit kickoff β†’ Svelte 5 custom elements β†’ SvelteKit design-system
e8a6c67
import { defineConfig, devices } from '@playwright/test';
/**
* Headless E2E for the Riprap UI. Targets a *running* uvicorn on
* 127.0.0.1:7860 β€” we don't spin up our own server because the live
* route depends on the FastAPI backend (planner, FSM, SSE, layer
* endpoints). Static-route tests work against /q/sample which is
* fully prerendered.
*
* Run with `npm run test:e2e` (uvicorn must already be up). The
* matrix `npm run check:all` will fail loudly if uvicorn isn't on
* the port β€” that's the design.
*/
export default defineConfig({
testDir: './tests/e2e',
timeout: 60_000,
expect: { timeout: 10_000 },
fullyParallel: false,
reporter: [['list']],
use: {
baseURL: process.env.RIPRAP_BASE_URL || 'http://127.0.0.1:7860',
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
headless: true
},
projects: [
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }
]
});