27 lines
905 B
TypeScript
27 lines
905 B
TypeScript
|
|
import { defineConfig, devices } from "@playwright/test";
|
||
|
|
|
||
|
|
// Browser smoke for the read-only dashboard SPA. The e2e mocks the `/api`
|
||
|
|
// backend (Playwright route fulfilment), so no live coordinator / DB is needed.
|
||
|
|
// The webServer builds + serves the production bundle via `vite preview`.
|
||
|
|
const PORT = 4173;
|
||
|
|
|
||
|
|
export default defineConfig({
|
||
|
|
testDir: "./e2e",
|
||
|
|
fullyParallel: true,
|
||
|
|
forbidOnly: !!process.env.CI,
|
||
|
|
retries: process.env.CI ? 2 : 0,
|
||
|
|
workers: process.env.CI ? 1 : undefined,
|
||
|
|
reporter: process.env.CI ? "github" : "list",
|
||
|
|
use: {
|
||
|
|
baseURL: `http://localhost:${PORT}`,
|
||
|
|
trace: "on-first-retry",
|
||
|
|
},
|
||
|
|
projects: [{ name: "chromium", use: { ...devices["Desktop Chrome"] } }],
|
||
|
|
webServer: {
|
||
|
|
command: `npm run build && npm run preview -- --port ${PORT} --strictPort`,
|
||
|
|
url: `http://localhost:${PORT}`,
|
||
|
|
reuseExistingServer: !process.env.CI,
|
||
|
|
timeout: 120_000,
|
||
|
|
},
|
||
|
|
});
|