forked from dhis2/capture-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cypress.config.js
35 lines (32 loc) · 1.08 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
const { chromeAllowXSiteCookies } = require('@dhis2/cypress-plugins');
const { defineConfig } = require('cypress');
const getCypressEnvVariables = require('./cypress/support/getCypressEnvVariables');
const cucumberPreprocessor = require('./cypress/support/cucumberPreprocessor');
async function setupNodeEvents(on, config) {
await chromeAllowXSiteCookies(on);
await cucumberPreprocessor(on, config);
config.env = getCypressEnvVariables(config);
return config;
}
module.exports = defineConfig({
video: true,
dhis2_datatest_prefix: 'dhis2-capture',
chromeWebSecurityComment:
'chromeWebSecurity should removed once https://github.com/cypress-io/cypress/issues/4220 is fixed',
chromeWebSecurity: false,
defaultCommandTimeout: 25000,
projectId: '322xnh',
experimentalFetchPolyfill: true,
retries: {
runMode: 3,
},
env: {
dhis2DataTestPrefix: 'capture-app',
networkMode: 'live',
},
e2e: {
setupNodeEvents,
baseUrl: 'http://localhost:3000',
specPattern: 'cypress/e2e/**/*.feature',
},
});