-
Notifications
You must be signed in to change notification settings - Fork 0
/
cypress.config.js
59 lines (54 loc) · 1.33 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
const { defineConfig } = require('cypress');
let env = {
wpUsername: 'admin',
wpPassword: 'password',
testURL: 'http://localhost:8888',
e2e: {
specPattern: ['packages/**/*.e2e.cy.js'],
excludeSpecPattern: ['packages/**/*.build.e2e.js'],
},
};
try {
env = require('./cypress.env.json');
} catch (error) {
console.log(error);
}
const setupNodeEvents = (on, config) => {
require('./packages/dev-cypress/js/plugins/index.js')(on, config);
return config;
};
module.exports = defineConfig({
chromeWebSecurity: false,
defaultCommandTimeout: 15000,
e2e: {
setupNodeEvents,
specPattern: env.e2e.specPattern,
excludeSpecPattern: env.e2e.excludeSpecPattern,
supportFile: 'packages/dev-cypress/js/support/e2e.js',
experimentalMemoryManagement: true,
numTestsKeptInMemory: 10,
},
env,
fixturesFolder: 'packages/dev-cypress/js/fixtures',
pageLoadTimeout: 120000,
projectId: 'blockera',
retries: {
openMode: 0,
runMode: 0,
},
coverage: true,
screenshotOnRunFailure: false,
screenshotsFolder: 'packages/dev-cypress/js/screenshots',
videosFolder: 'packages/dev-cypress/js/videos',
viewportHeight: 1440,
viewportWidth: 2560,
component: {
setupNodeEvents,
devServer: {
framework: 'react',
bundler: 'webpack',
},
specPattern: 'packages/**/*.cy.js',
supportFile: 'packages/dev-cypress/js/support/component.js',
},
});