-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathplaywright.config.ts
38 lines (36 loc) · 1.1 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
import type { PlaywrightTestConfig } from '@playwright/test';
import { devices } from '@playwright/test';
const config: PlaywrightTestConfig = {
testDir: './tests',
globalSetup: require.resolve('./tests/setup/globalSetup'),
workers: 1,
reporter: process.env.CI ? 'github' : undefined,
use: {
browserName: 'chromium',
channel: 'chrome',
ignoreHTTPSErrors: true,
launchOptions: {
args: [
'--allow-insecure-localhost',
'--ignore-certificate-errors',
/**
* @note Setting this feature flag prevents "SharedArrayBuffer is not defined"
* for insecure hosts.
*/
'--enable-features=SharedArrayBuffer',
'--unsafely-treat-insecure-origin-as-secure=https://localhost',
],
devtools: true,
},
screenshot: 'only-on-failure',
},
projects: process.env.CI
? [
{ name: 'chromium', use: devices['Desktop Chrome'] },
{ name: 'firefox', use: devices['Desktop Firefox'] },
{ name: 'webkit', use: devices['Desktop Safari'] },
]
: [],
forbidOnly: !!process.env.CI,
};
export default config;