-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcypress.config.ts
46 lines (42 loc) · 1.44 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
import { createEsbuildPlugin } from '@badeball/cypress-cucumber-preprocessor/esbuild'
import createBundler from '@bahmutov/cypress-esbuild-preprocessor'
import { addCucumberPreprocessorPlugin } from '@badeball/cypress-cucumber-preprocessor'
import { defineConfig } from 'cypress'
import { resetStubs } from './integration_tests/mockApis/wiremock'
import eqApi from './integration_tests/mockApis/eqApi'
import sdsApi from './integration_tests/mockApis/sdsApi'
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: {
async setupNodeEvents(
on: Cypress.PluginEvents,
config: Cypress.PluginConfigOptions,
): Promise<Cypress.PluginConfigOptions> {
await addCucumberPreprocessorPlugin(on, config)
on(
'file:preprocessor',
createBundler({
plugins: [createEsbuildPlugin(config)],
}),
)
on('task', {
reset: resetStubs,
...eqApi,
...sdsApi,
})
return config
},
baseUrl: 'http://localhost:3007',
excludeSpecPattern: '**/!(*.cy).ts',
specPattern: 'integration_tests/e2e/**/*.{js,jsx,ts,tsx,feature}',
supportFile: 'integration_tests/support/index.ts',
},
})