-
Notifications
You must be signed in to change notification settings - Fork 5
/
playwright.config.ts
45 lines (42 loc) · 1.31 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
// eslint-disable-next-line import/no-extraneous-dependencies
import { PlaywrightTestConfig, devices } from '@playwright/test';
const isCircleCI = process.env.CI;
const config: PlaywrightTestConfig = {
workers: 1,
timeout: 10 * 1000,
use: {
ignoreHTTPSErrors: true,
headless: true,
launchOptions: {
args: [
'--use-fake-ui-for-media-stream', // avoids the need to grant camera/microphone permissions
'--use-fake-device-for-media-stream', // feeds a test pattern to getUserMedia() instead of live camera input
'--no-sandbox', // disable Chrome's sandbox as we trust the content
'--disable-setuid-sandbox', // disable Linux SUID sandbox
],
firefoxUserPrefs: {
'media.navigator.permission.disabled': true, // avoids the need to grant camera/microphone permissions
'media.navigator.streams.fake': true, // feeds a test pattern to getUserMedia() instead of live camera input
},
},
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
...(isCircleCI
? [
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},
]
: []),
],
webServer: {
command: 'node test/__setup__/server.js',
port: 3077,
},
};
export default config;