-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
38 lines (33 loc) · 1.04 KB
/
playwright.config.ts
File metadata and controls
38 lines (33 loc) · 1.04 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
import { defineConfig, devices } from '@playwright/test'
const BASE_URL = process.env.PLAYWRIGHT_BASE_URL || 'http://localhost:3000'
export default defineConfig({
testDir: './e2e',
fullyParallel: false,
retries: process.env.CI ? 2 : 0,
timeout: 30_000,
expect: { timeout: 8_000 },
reporter: [['list'], ['html', { open: 'never' }]],
use: {
baseURL: BASE_URL,
permissions: ['camera', 'microphone', 'clipboard-read', 'clipboard-write'],
launchOptions: {
args: [
'--use-fake-device-for-media-stream',
'--use-fake-ui-for-media-stream',
],
},
screenshot: 'only-on-failure',
video: 'retain-on-failure',
trace: 'retain-on-failure',
},
projects: [
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
],
// Skip auto-starting a dev server when caller points us at an existing one.
webServer: process.env.PLAYWRIGHT_BASE_URL ? undefined : {
command: 'npm run dev',
url: 'http://localhost:3000',
reuseExistingServer: !process.env.CI,
timeout: 60_000,
},
})