-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
40 lines (39 loc) · 1.5 KB
/
Copy pathplaywright.config.ts
File metadata and controls
40 lines (39 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { defineConfig, devices } from "@playwright/test";
/**
* Playwright config for the LOCAL end-to-end test (`pnpm e2e`).
*
* This drives the real app, real React UI, real Mastra agent (Claude Haiku),
* real Supabase, so it needs ANTHROPIC_API_KEY + DATABASE_URL in the
* environment (load them from .env). It is deliberately NOT wired into CI: CI has
* no secrets and shouldn't spend tokens (same stance as the live eval in the
* sibling repo). Run it by hand before deploys to confirm the human-in-the-loop
* Approve/Reject flow works through the actual browser.
*
* Specs live in `e2e/*.e2e.ts` so they're not picked up by `pnpm test` (Node's
* runner globs `**/*.test.ts`).
*/
export default defineConfig({
testDir: "./e2e",
testMatch: "**/*.e2e.ts",
// A full 4-agent run plus the approval resume is a handful of Haiku calls;
// give each test generous headroom over that.
timeout: 90_000,
expect: { timeout: 15_000 },
fullyParallel: false,
workers: 1,
reporter: [["list"]],
use: {
baseURL: "http://localhost:3000",
trace: "retain-on-failure",
},
projects: [{ name: "chromium", use: { ...devices["Desktop Chrome"] } }],
// Start the app for the test. `reuseExistingServer` lets you point at a dev
// server you already have running; otherwise it boots `pnpm dev`. The dev
// process must see the env vars, run `pnpm e2e` with .env loaded.
webServer: {
command: "pnpm dev",
url: "http://localhost:3000",
reuseExistingServer: true,
timeout: 120_000,
},
});