generated from ministryofjustice/hmpps-template-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cypress.config.ts
40 lines (39 loc) · 1.23 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
import { defineConfig } from 'cypress'
import { resetStubs } from './integration_tests/mockApis/wiremock'
import auth from './integration_tests/mockApis/auth'
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) {
on('task', {
reset: resetStubs,
...auth,
table(message) {
// eslint-disable-next-line no-console
console.table(message)
return null
},
})
},
baseUrl: 'http://localhost:6789',
excludeSpecPattern: '**/!(*.cy).ts',
specPattern: 'integration_tests/e2e/**/*.{cy,spec}.{js,jsx,ts,tsx}',
supportFile: 'integration_tests/support/index.ts',
env: {
CLIENT_ID: 'sentence-plan-api-client',
CLIENT_SECRET: 'sentence-plan-api-client',
HMPPS_AUTH_URL: 'http://localhost:9091',
ARNS_HANDOVER_URL: 'http://localhost:7070',
ARNS_HANDOVER_CLIENT_ID: 'sentence-plan',
SP_API_URL: 'http://localhost:8080',
},
},
})