-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.proofloop.config.ts
More file actions
35 lines (33 loc) · 1.24 KB
/
Copy pathplaywright.proofloop.config.ts
File metadata and controls
35 lines (33 loc) · 1.24 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
import { defineConfig, devices } from "@playwright/test";
const playwrightPort = process.env.PLAYWRIGHT_PORT ?? "5173";
const playwrightBaseUrl = process.env.PLAYWRIGHT_BASE_URL ?? `http://127.0.0.1:${playwrightPort}`;
const reuseExistingServer = process.env.PLAYWRIGHT_REUSE_SERVER === "1";
const authStorageState = process.env.PROOFLOOP_AUTH_STORAGE_STATE?.trim();
/**
* Playwright config for proof-loop specs.
* Same webServer setup as the main config but testDir points to proofloop/
* so specs in proofloop/accounting/scenarios/ and proofloop/notion/scenarios/
* are discovered.
*/
export default defineConfig({
testDir: "./proofloop",
fullyParallel: false,
workers: 1,
retries: process.env.CI ? 1 : 0,
timeout: 30_000,
expect: { timeout: 7_000 },
reporter: process.env.CI ? "line" : "list",
use: {
baseURL: playwrightBaseUrl,
storageState: authStorageState || undefined,
trace: "on-first-retry",
video: process.env.PLAYWRIGHT_RECORD_VIDEO === "1" ? "on" : "off",
},
webServer: {
command: `npm run dev -- --host 127.0.0.1 --port ${playwrightPort} --strictPort`,
url: playwrightBaseUrl,
reuseExistingServer,
timeout: 120_000,
},
projects: [{ name: "chromium", use: { ...devices["Desktop Chrome"] } }],
});