generated from ministryofjustice/hmpps-template-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcypress.config.ts
45 lines (43 loc) · 1.57 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
import { defineConfig } from 'cypress'
import { resetStubs } from './integration_tests/mockApis/wiremock'
import auth from './integration_tests/mockApis/auth'
import manageUsersApi from './integration_tests/mockApis/manageUsersApi'
import tokenVerification from './integration_tests/mockApis/tokenVerification'
import nomisUserRolesApi from './integration_tests/mockApis/nomisUserRolesApi'
import prisonApi from './integration_tests/mockApis/prisonApi'
import offenderSearchApi from './integration_tests/mockApis/offenderSearchApi'
import nonAssociationsApi from './integration_tests/mockApis/nonAssociationsApi'
import frontendComponents from './integration_tests/mockApis/frontendComponents'
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',
},
video: false,
taskTimeout: 60000,
viewportWidth: 1200,
viewportHeight: 850,
e2e: {
setupNodeEvents(on) {
on('task', {
resetStubs,
...auth,
...manageUsersApi,
...tokenVerification,
...nomisUserRolesApi,
...prisonApi,
...offenderSearchApi,
...nonAssociationsApi,
...frontendComponents,
})
},
baseUrl: 'http://localhost:3007',
excludeSpecPattern: '**/!(*.cy).ts',
specPattern: 'integration_tests/e2e/**/*.cy.{js,jsx,ts,tsx}',
supportFile: 'integration_tests/support/index.ts',
},
})