forked from revisit-studies/study
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
42 lines (36 loc) · 931 Bytes
/
playwright.config.ts
File metadata and controls
42 lines (36 loc) · 931 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';
const isCI = Boolean(process.env.CI);
const configuredCiWorkers = Number(process.env.PW_CI_WORKERS);
const ciWorkers = Number.isFinite(configuredCiWorkers) && configuredCiWorkers > 0
? configuredCiWorkers
: 2;
export default defineConfig({
webServer: {
command: 'yarn serve',
url: 'http://localhost:8080',
reuseExistingServer: !isCI,
stdout: 'ignore',
stderr: 'pipe',
},
testDir: './tests',
fullyParallel: true,
// Retry on CI only.
retries: isCI ? 2 : 0,
workers: isCI ? ciWorkers : '90%',
timeout: isCI ? 120000 : 60000,
reporter: isCI ? 'github' : 'list',
use: {
baseURL: 'http://localhost:8080',
trace: 'on-first-retry',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},
],
});