generated from ministryofjustice/hmpps-template-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cypress.config.ts
52 lines (51 loc) · 1.68 KB
/
cypress.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
import { defineConfig } from 'cypress'
import coverageTask from '@cypress/code-coverage/task'
import { resetStubs } from './integration_tests/mockApis/wiremock'
import auth from './integration_tests/mockApis/auth'
import tokenVerification from './integration_tests/mockApis/tokenVerification'
import prisonerSearchApi from './integration_tests/mockApis/prisonerSearchApi'
import prisonApi from './integration_tests/mockApis/prisonApi'
import csipApi from './integration_tests/mockApis/csipApi'
import componentsApi from './integration_tests/mockApis/componentsApi'
import logAccessibilityViolations from './integration_tests/support/accessibilityViolations'
export default defineConfig({
chromeWebSecurity: false,
fixturesFolder: 'integration_tests/fixtures',
screenshotsFolder: 'integration_tests/screenshots',
videosFolder: 'integration_tests/videos',
reporter: 'cypress-multi-reporters',
reporterOptions: {
configFile: 'reporter-config.json',
},
taskTimeout: 60000,
e2e: {
setupNodeEvents(on, config) {
coverageTask(on, config)
on('task', {
reset: resetStubs,
...auth,
...tokenVerification,
...logAccessibilityViolations,
...prisonerSearchApi,
...csipApi,
...prisonApi,
...componentsApi,
})
return config
},
baseUrl: 'http://localhost:3007',
excludeSpecPattern: ['dist', '**/!(*.cy).ts'],
specPattern: '**/*.cy.{js,jsx,ts,tsx}',
supportFile: 'integration_tests/support/index.ts',
experimentalRunAllSpecs: true,
env: {
codeCoverage: {
url: 'http://localhost:3007/__coverage__',
},
},
retries: {
runMode: 2,
},
},
redirectionLimit: 50,
})