-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
48 lines (41 loc) · 1.08 KB
/
playwright.config.ts
File metadata and controls
48 lines (41 loc) · 1.08 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
48
import { PlaywrightTestConfig, devices } from '@playwright/test'
const config: PlaywrightTestConfig = {
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},
{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},
{
name: 'iPhone 13',
use: {
browserName: 'webkit',
...devices['iPhone 13'],
},
},
],
// Look for test files in the "tests" directory, relative to this configuration file
testDir: 'e2e',
// Each test is given 30 seconds
timeout: 30000,
// Two retries for each test
retries: 2,
// Forbid test.only on CI
forbidOnly: !!process.env.CI,
// Limit the number of workers on CI, use default locally
workers: process.env.CI ? 2 : undefined,
use: {
// Record trace for each test, but remove it from successful test runs
trace: 'retain-on-failure',
// Record video only when retrying a test for the first time.
video: 'on-first-retry',
},
}
export default config