generated from ministryofjustice/hmpps-template-typescript
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcypress.config.ts
70 lines (69 loc) · 2.65 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import { defineConfig } from 'cypress'
import { resetStubs } from './integration_tests/mockApis/setup'
import auth from './integration_tests/mockApis/auth'
import tokenVerification from './integration_tests/mockApis/tokenVerification'
import premises from './integration_tests/mockApis/premises'
import booking from './integration_tests/mockApis/booking'
import bookingExtension from './integration_tests/mockApis/bookingExtension'
import cancellation from './integration_tests/mockApis/cancellation'
import outOfServiceBed from './integration_tests/mockApis/outOfServiceBed'
import person from './integration_tests/mockApis/person'
import reports from './integration_tests/mockApis/reports'
import applications from './integration_tests/mockApis/applications'
import { stubJourney, verifyApiPost } from './integration_tests/mockApis/journeyUtils'
import assessments from './integration_tests/mockApis/assessments'
import users from './integration_tests/mockApis/users'
import tasks from './integration_tests/mockApis/tasks'
import placementRequests from './integration_tests/mockApis/placementRequests'
import placementApplication from './integration_tests/mockApis/placementApplication'
import beds from './integration_tests/mockApis/beds'
import spaceSearch from './integration_tests/mockApis/spaces'
import spaceBookings from './integration_tests/mockApis/spaceBooking'
import referenceData from './integration_tests/mockApis/referenceData'
export default defineConfig({
chromeWebSecurity: false,
fixturesFolder: 'integration_tests/fixtures',
screenshotsFolder: 'integration_tests/screenshots',
trashAssetsBeforeRuns: true,
downloadsFolder: 'integration_tests/downloads',
videosFolder: 'integration_tests/videos',
reporter: 'cypress-multi-reporters',
reporterOptions: {
configFile: 'reporter-config.json',
},
taskTimeout: 70000,
e2e: {
setupNodeEvents(on) {
on('task', {
reset: resetStubs,
...auth,
...tokenVerification,
...premises,
...booking,
...bookingExtension,
...cancellation,
...outOfServiceBed,
...person,
...applications,
...assessments,
...users,
...tasks,
...placementRequests,
...placementApplication,
...beds,
...spaceSearch,
...reports,
...spaceBookings,
...referenceData,
stubJourney,
verifyApiPost,
})
},
baseUrl: 'http://localhost:3007',
excludeSpecPattern: '**/!(*.cy).ts',
specPattern: 'integration_tests/tests/**/*.cy.{js,jsx,ts,tsx}',
supportFile: 'integration_tests/support/index.ts',
viewportHeight: 800,
viewportWidth: 1020,
},
})