-
Notifications
You must be signed in to change notification settings - Fork 304
/
Copy pathplaywright.config.ts
50 lines (45 loc) · 1.22 KB
/
playwright.config.ts
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
49
50
/* eslint-disable turbo/no-undeclared-env-vars */
import type { PlaywrightTestConfig } from '@playwright/test';
import { defineConfig, devices } from '@playwright/test';
import { config } from 'dotenv';
import * as path from 'path';
config({ path: path.resolve(__dirname, '.env.local') });
export const common: PlaywrightTestConfig = {
testDir: './tests',
snapshotDir: './tests/snapshots',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 5 : 0,
timeout: 90_000,
maxFailures: process.env.CI ? 5 : undefined,
workers: process.env.CI ? '50%' : '70%',
use: {
ignoreHTTPSErrors: true,
trace: 'retain-on-failure',
bypassCSP: true, // We probably need to limit this to specific tests
},
} as const;
export default defineConfig({
...common,
projects: [
{
name: 'setup',
testMatch: /global\.setup/,
teardown: 'teardown',
},
{
name: 'teardown',
testMatch: /global\.teardown/,
},
{
name: 'chrome',
use: { ...devices['Desktop Chrome'], channel: 'chrome' },
dependencies: ['setup'],
},
// {
// name: 'webkit',
// use: { ...devices['Desktop Safari'] },
// dependencies: ['setup'],
// },
],
});