-
Notifications
You must be signed in to change notification settings - Fork 67
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
47 lines (45 loc) · 1.01 KB
/
playwright.config.ts
File metadata and controls
47 lines (45 loc) · 1.01 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
41
42
43
44
45
46
47
import { defineConfig, devices } from "@playwright/test";
const WEB_PORT = 3000;
const API_PORT = 3001;
export default defineConfig({
testDir: "./tests/e2e",
fullyParallel: true,
retries: process.env.CI ? 2 : 0,
reporter: [["list"], ["html", { open: "never" }]],
timeout: 90_000,
expect: {
timeout: 10_000,
},
use: {
baseURL: `http://127.0.0.1:${WEB_PORT}`,
trace: "retain-on-failure",
screenshot: "only-on-failure",
video: "off",
},
webServer: [
{
command: "node tests/e2e/mock-backend.mjs",
port: API_PORT,
reuseExistingServer: !process.env.CI,
timeout: 120_000,
env: {
PORT: String(API_PORT),
},
},
{
command: "npm run start:web:e2e",
port: WEB_PORT,
reuseExistingServer: !process.env.CI,
timeout: 600_000,
env: {
NEXT_PUBLIC_API_URL: `http://127.0.0.1:${API_PORT}`,
},
},
],
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
],
});