forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
36 lines (35 loc) · 1.12 KB
/
playwright.config.ts
File metadata and controls
36 lines (35 loc) · 1.12 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
import { defineConfig, devices } from "@playwright/test"
/**
* E2E tests for opencode-router-app.
*
* Prerequisites (already running):
* - opencode-router: bun dev (packages/opencode-router) → http://localhost:3002
* - opencode-router-app: bun dev (packages/opencode-router-app) → http://localhost:5173 (proxied via router)
*
* The tests target the router at http://localhost:3002.
* [email protected] is set in the router's .env.local so no real auth is needed.
*
* Run:
* cd packages/opencode-router-app && bunx playwright test
*/
export default defineConfig({
testDir: "./e2e",
outputDir: "./e2e/test-results",
timeout: 120_000,
expect: { timeout: 15_000 },
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 1 : 0,
reporter: [["html", { outputFolder: "e2e/playwright-report", open: "never" }], ["line"]],
use: {
baseURL: process.env.ROUTER_URL ?? "http://localhost:3002",
trace: "on-first-retry",
screenshot: "only-on-failure",
},
projects: [
{
name: "msedge",
use: { ...devices["Desktop Edge"], channel: "msedge" },
},
],
})