-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
30 lines (29 loc) · 968 Bytes
/
playwright.config.ts
File metadata and controls
30 lines (29 loc) · 968 Bytes
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
import { defineConfig } from '@playwright/test';
export default defineConfig({
testDir: './src/__tests__/e2e', // path to your e2e tests folder
timeout: 30 * 1000, // max time per test in ms (30 seconds)
retries: 1, // retry once on failure (can adjust)
reporter: 'html', // generates a nice HTML report
use: {
headless: true, // run tests in headless mode (no UI)
viewport: { width: 1280, height: 720 },
actionTimeout: 10 * 1000, // max time per action (click, type, etc)
ignoreHTTPSErrors: true,
video: 'retain-on-failure', // record video only if test fails
screenshot: 'only-on-failure', // take screenshot on failure
},
projects: [
{
name: 'chromium',
use: { browserName: 'chromium' },
},
{
name: 'firefox',
use: { browserName: 'firefox' },
},
{
name: 'webkit',
use: { browserName: 'webkit' },
},
],
});