-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
39 lines (37 loc) · 1.04 KB
/
playwright.config.ts
File metadata and controls
39 lines (37 loc) · 1.04 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
import path from "node:path";
import { defineConfig, devices } from "@playwright/test";
const storybookPort = Number(process.env.ELIZA_UI_STORYBOOK_PORT || "6106");
const recording = !!process.env.E2E_RECORD;
export default defineConfig({
testDir: "./e2e",
timeout: 120_000,
expect: {
timeout: 10_000,
},
fullyParallel: false,
retries: 0,
workers: 1,
reporter: "list",
outputDir: recording
? path.resolve(import.meta.dirname, "../../e2e-recordings/app-core/test-results")
: "./test-results",
use: {
baseURL: `http://127.0.0.1:${storybookPort}`,
trace: recording ? "on" : "retain-on-failure",
screenshot: recording ? "on" : "only-on-failure",
video: recording ? "on" : "retain-on-failure",
},
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
],
webServer: {
command: `bun run storybook -- --ci --host 127.0.0.1 --port ${storybookPort}`,
cwd: import.meta.dirname,
port: storybookPort,
reuseExistingServer: false,
timeout: 180_000,
},
});