26 lines
830 B
TypeScript
26 lines
830 B
TypeScript
import { defineConfig, devices } from "@playwright/test";
|
||
|
||
const WEB_PORT = 4173;
|
||
const WEB = `http://127.0.0.1:${WEB_PORT}`;
|
||
|
||
/**
|
||
* Browser tests against the web build alone (Phases 11–12, CR-014): the game
|
||
* runs in the page, saved in IndexedDB. Build with `pnpm build:e2e` first
|
||
* (developer tools and the `window.deadhead` test hook on). The tests move the
|
||
* game clock with the developer offset, so they run one at a time.
|
||
*/
|
||
export default defineConfig({
|
||
testDir: "e2e",
|
||
testMatch: "**/*.e2e.ts",
|
||
workers: 1,
|
||
fullyParallel: false,
|
||
retries: process.env.CI ? 1 : 0,
|
||
timeout: 120_000,
|
||
use: { baseURL: WEB, ...devices["Desktop Chrome"] },
|
||
webServer: {
|
||
command: `pnpm exec vite preview --port ${WEB_PORT} --strictPort --host 127.0.0.1`,
|
||
url: WEB,
|
||
reuseExistingServer: !process.env.CI,
|
||
},
|
||
});
|