generated from ministryofjustice/hmpps-template-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
playwright.config.ts
104 lines (103 loc) · 2.76 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import { defineConfig, devices } from '@playwright/test'
import 'dotenv/config'
import { TestOptions } from './e2e-tests/testOptions'
export default defineConfig<TestOptions>({
testDir: './e2e-tests/tests',
outputDir: './e2e-tests/test_results',
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
maxFailures: 1,
workers: 1,
reporter: [['html', { outputFolder: './e2e-tests/playwright-report/index.html' }]],
timeout: process.env.CI ? 5 * 60 * 1000 : 2 * 60 * 1000,
use: {
trace: 'on-first-retry',
video: 'on-first-retry',
},
projects: [
{
name: 'setupDev',
testMatch: /.*\.setup\.ts/,
use: { baseURL: 'https://community-accommodation-tier-2-bail-dev.hmpps.service.justice.gov.uk' },
},
{
name: 'dev',
use: {
...devices['Desktop Chrome'],
baseURL: 'https://community-accommodation-tier-2-bail-dev.hmpps.service.justice.gov.uk',
},
dependencies: ['setupDev'],
},
{
name: 'setupLocal',
testMatch: /.*\.setup\.ts/,
use: {
baseURL: 'http://localhost:3000',
pomUser: {
name: 'Prison Officer',
username: 'POM_USER',
password: 'password123456',
},
lcaUser: {
name: 'LCA User',
username: 'CAS2_LICENCE_USER',
password: 'password123456',
},
adminUser: {
name: 'CAS2 Admin',
username: 'CAS2_ADMIN_USER',
password: 'password123456',
},
assessorUser: {
name: 'CAS2 Assessor',
username: 'CAS2_ASSESSOR_USER',
password: 'password123456',
},
},
},
{
name: 'local',
use: {
...devices['Desktop Chrome'],
baseURL: 'http://localhost:3000',
person: {
name: 'Aadland Bertrand',
crn: 'X320741',
nomsNumber: 'A1234AI',
},
personWithoutOasys: {
name: 'James Brown',
crn: 'C246139',
nomsNumber: 'A1234AJ',
},
pomUser: {
name: 'Prison Officer',
username: 'POM_USER',
password: 'password123456',
},
lcaUser: {
name: 'Licence Case-Admin',
username: 'CAS2_LICENCE_USER',
password: 'password123456',
},
adminUser: {
name: 'CAS2 Admin',
username: 'CAS2_ADMIN_USER',
password: 'password123456',
},
assessorUser: {
name: 'CAS2 Assessor',
username: 'CAS2_ASSESSOR_USER',
password: 'password123456',
},
miUser: {
name: 'MI User',
username: 'CAS2_MI_USER',
password: 'password123456',
},
},
dependencies: ['setupLocal'],
},
],
})