-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
42 lines (41 loc) · 968 Bytes
/
Copy pathplaywright.config.ts
File metadata and controls
42 lines (41 loc) · 968 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
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './tests/e2e',
timeout: 120_000,
use: {
trace: 'on-first-retry',
},
projects: [
{
name: 'api',
testMatch: /fairshare\.spec\.ts/,
use: {
baseURL: process.env.E2E_API_BASE_URL ?? 'http://localhost:3001/api/v1',
},
},
{
name: 'web',
testMatch: /dashboard\.spec\.ts/,
use: {
...devices['Desktop Chrome'],
baseURL: process.env.WEB_URL ?? 'http://localhost:3000',
},
},
],
webServer: process.env.CI
? [
{
command: 'pnpm --filter backend start',
port: 3001,
timeout: 180_000,
reuseExistingServer: !process.env.CI,
},
{
command: 'pnpm --filter web start',
port: 3000,
timeout: 180_000,
reuseExistingServer: !process.env.CI,
},
]
: undefined,
});