-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
43 lines (40 loc) · 922 Bytes
/
Copy pathplaywright.config.ts
File metadata and controls
43 lines (40 loc) · 922 Bytes
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
41
42
43
import path from "node:path";
import { defineConfig, devices } from "@playwright/test";
import dotenv from "dotenv";
dotenv.config({ path: path.resolve(__dirname, ".env") });
const isCI = !!process.env.CI;
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: "./tests/e2e",
fullyParallel: true,
forbidOnly: isCI,
retries: isCI ? 1 : 0,
workers: isCI ? 1 : undefined,
reporter: [["html"]],
use: {
baseURL: "http://localhost:3000",
trace: "on-first-retry",
video: {
mode: "retain-on-failure",
size: { width: 640, height: 480 },
},
},
projects: [
{ name: "setup", testMatch: /.*\.setup\.ts/ },
{
name: "chromium",
use: {
...devices["Desktop Chrome"],
},
},
],
webServer: {
command: "npm run build && npm run start",
url: "http://localhost:3000",
reuseExistingServer: !isCI,
stdout: "pipe",
timeout: 180 * 1000,
},
});