-
Notifications
You must be signed in to change notification settings - Fork 0
/
cypress.config.ts
44 lines (43 loc) · 1.52 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
/* eslint-disable global-require */
/* eslint-disable import/no-import-module-exports */
import { defineConfig } from 'cypress';
export default defineConfig({
projectId: 'ssiwb9',
fixturesFolder: 'cypress/fixtures',
screenshotsFolder: 'cypress/screenshots',
downloadsFolder: 'cypress/downloads',
component: {
supportFile: 'cypress/support/component.js',
specPattern: '**/*.test.{js,jsx,ts,tsx}',
indexHtmlFile: 'cypress/support/component-index.html',
devServer: {
framework: 'react',
bundler: 'webpack'
},
setupNodeEvents(on, config) {
require('@cypress/code-coverage/task')(on, config);
on('file:preprocessor', require('@cypress/code-coverage/use-babelrc'));
return config;
},
excludeSpecPattern: 'cypress/integration/**'
},
e2e: {
baseUrl: 'http://localhost:6101',
defaultCommandTimeout: 10000,
deleteVideoOnPassed: true,
betterRetries: true,
reporter: 'cypress-xray-junit-reporter',
reporterOptions: {
mochaFile: './report/[suiteName].xml',
useFullSuiteTitle: false,
jenkinsMode: true,
xrayMode: true, // if JiraKey are set correctly inside the test the XML report will contain the JiraKey value
attachScreenshot: true // if a test fails, the screenshot will be attached to the XML report and imported into xray
},
setupNodeEvents(on, config) {
require('cypress-xray-junit-reporter/plugin')(on, config, {}); // also needed
return config;
},
specPattern: 'cypress/integration/**/*.test.js'
}
});