-
Notifications
You must be signed in to change notification settings - Fork 5
/
cypress.config.js
45 lines (44 loc) · 1.31 KB
/
cypress.config.js
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
const { defineConfig } = require('cypress');
const codeCoverageTask = require('@cypress/code-coverage/task');
module.exports = defineConfig({
chromeWebSecurity: false,
component: {
devServer: {
bundler: 'webpack',
framework: 'next',
},
setupNodeEvents(on, config) {
codeCoverageTask(on, config);
return config;
},
specPattern: 'components/**/*.cy.{js,jsx,ts,tsx}',
},
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
baseUrl: 'http://localhost:4100',
setupNodeEvents(on, config) {
require('@cypress/code-coverage/task')(on, config);
// IMPORTANT to return the config object
// with the any changed environment variables
return config;
},
specPattern: 'cypress/test/**/*.*',
},
env: {
codeCoverage: {
exclude: 'cypress/**/*.*',
url: '/api/__coverage__',
},
coverage: false,
},
fixturesFolder: 'cypress/fixtures',
reporter: 'junit',
retries: {
openMode: 0,
runMode: 1,
},
screenshotsFolder: 'cypress/screenshots',
videosFolder: 'cypress/videos',
videoUploadOnPasses: false,
});