-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
60 lines (57 loc) · 1.45 KB
/
playwright.config.ts
File metadata and controls
60 lines (57 loc) · 1.45 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import { defineConfig, devices } from '@playwright/test';
import { AuthFile } from './constants/AuthFile';
import dotenv from 'dotenv';
if (!process.env.CI) {
dotenv.config({ path: ".env", quiet: true });
}
export default defineConfig({
testDir: './tests',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
timeout: process.env.CI ? 60 * 1000 : 45 * 1000,
expect: {
timeout: process.env.CI ? 10 * 1000 : 8 * 1000,
},
reporter: 'list',
use: {
testIdAttribute: 'data-test-selector',
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: process.env.CI ? 'off' : 'retain-on-failure',
actionTimeout: process.env.CI ? 15 * 1000 : 10 * 1000,
navigationTimeout: process.env.CI ? 30 * 1000 : 20 * 1000,
},
projects: [
{
name: 'setup',
testMatch: /authenticate.setup.ts/,
},
{
name: 'app-install',
testMatch: /app-install.setup.ts/,
use: {
...devices['Desktop Chrome'],
storageState: AuthFile
},
dependencies: ["setup"]
},
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
storageState: AuthFile
},
dependencies: ["setup", "app-install"]
},
{
name: 'app-uninstall',
testMatch: /app-uninstall.teardown.ts/,
use: {
...devices['Desktop Chrome'],
storageState: AuthFile
},
dependencies: ["chromium"]
},
],
});