mirror of
https://github.com/andrewyng/openworker.git
synced 2026-09-03 04:49:26 +00:00
Imported from andrewyng/aisuite@1b4bbf303e (contents of its platform/ directory, hoisted to the repo root). Development history prior to this commit lives in that repository. Co-authored-by: Devika <devikaverma11@gmail.com>
27 lines
998 B
TypeScript
27 lines
998 B
TypeScript
import { defineConfig, devices } from "@playwright/test";
|
|
|
|
// E2E harness for the GUI. Tests are hermetic: every /v1 request and the event WebSocket are mocked
|
|
// at the network layer (see e2e/fixtures.ts), so they run without the Python backend and never
|
|
// mutate real state — safe for CI and for asserting regressions in the interaction flows.
|
|
const PORT = 5199;
|
|
|
|
export default defineConfig({
|
|
testDir: "./e2e",
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 1 : 0,
|
|
reporter: process.env.CI ? "line" : [["list"]],
|
|
use: {
|
|
baseURL: `http://localhost:${PORT}`,
|
|
trace: "on-first-retry",
|
|
},
|
|
projects: [{ name: "chromium", use: { ...devices["Desktop Chrome"] } }],
|
|
webServer: {
|
|
// Dev server on a dedicated port so it never collides with a running `npm run dev` (5173).
|
|
command: `npm run dev -- --port ${PORT} --strictPort`,
|
|
url: `http://localhost:${PORT}`,
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 120_000,
|
|
},
|
|
});
|