-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathplaywright.config.ts
84 lines (83 loc) · 2.49 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import { defineConfig, devices } from '@playwright/test';
import config from './playwright-e2e/config/config';
import os from 'node:os';
export default defineConfig({
testDir: './playwright-e2e/tests',
globalTeardown: process.env.CI ? undefined : './playwright-e2e/global/teardown-local',
forbidOnly: !!process.env.CI,
fullyParallel: true,
retries: config.playwright.retries ?? 0,
workers: config.playwright.workers,
reporter: process.env.CI
? [
[
'allure-playwright',
{
outputFolder:
process.env.FUNCTIONAL === 'true'
? 'playwright-allure-functional-results'
: 'playwright-allure-bootstrap-results',
environmentInfo: {
Environment: config.environment,
Workers: process.env.PLAYWRIGHT_WORKERS,
OS: os.platform(),
Architecture: os.arch(),
NodeVersion: process.version,
},
},
],
]
: 'list',
timeout: 360_000,
expect: {
timeout: 30_000,
toPass: {
timeout: config.playwright.toPassTimeout,
},
},
outputDir: './playwright-test-results',
use: {
actionTimeout: config.playwright.actionTimeout,
headless: !config.playwright.showBrowserWindow,
video: { mode: 'retain-on-failure' },
screenshot: { mode: 'only-on-failure', fullPage: true },
launchOptions: {
slowMo: process.env.CI ? 200 : 500,
},
},
projects: [
{
name: 'data-setup',
testMatch: '**playwright-e2e/tests/bootstrap/data/**.setup.ts',
retries: 0,
},
{
name: 'users-setup',
testMatch: '**playwright-e2e/tests/bootstrap/users/**.setup.ts',
retries: 0,
},
{
name: 'users-auth-setup',
use: { ...devices['Desktop Chrome'] },
testMatch: '**playwright-e2e/tests/bootstrap/auth/**.setup.ts',
dependencies: ['users-setup'],
teardown: 'users-auth-teardown',
},
{
name: 'users-auth-teardown',
use: { ...devices['Desktop Chrome'] },
testMatch: '**playwright-e2e/tests/bootstrap/auth/**.teardown.ts',
},
{
name: 'case-role-assignment-teardown',
use: { ...devices['Desktop Chrome'] },
testMatch: '**playwright-e2e/tests/bootstrap/case-role-assignment/**.teardown.ts',
},
{
name: 'e2e-full-functional',
use: { ...devices['Desktop Chrome'] },
dependencies: ['data-setup', 'users-auth-setup'],
teardown: 'case-role-assignment-teardown'
},
],
});