forked from frappe/press
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
39 lines (37 loc) · 1015 Bytes
/
playwright.config.ts
File metadata and controls
39 lines (37 loc) · 1015 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
31
32
33
34
35
36
37
38
39
import { defineConfig, devices } from '@playwright/test';
import dotenv from "dotenv";
dotenv.config({ path: "./tests-e2e/.env", quiet: true });
export default defineConfig({
testDir: './tests-e2e',
fullyParallel: true,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 4 : undefined,
use: {
baseURL: process.env.BASE_URL || 'http://localhost:8010',
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
video: 'retain-on-failure'
},
reporter: [['list'], ['html', { open: 'never' }]],
projects: [
{
name: 'cron',
testMatch: /.*\.cron\.spec\.ts/,
dependencies: undefined
},
{
name: 'setup',
testMatch: /.*\.setup\.ts/
},
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
storageState: 'tests-e2e/.auth/session.json'
},
// must match all *.test.ts files only
testMatch: /^(?!.*(\.cron|\.setup)\.spec\.ts$).*\.test\.ts$/,
dependencies: ['setup']
}
]
});