-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcypress.config.js
43 lines (42 loc) · 1.19 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
const { defineConfig } = require('cypress');
module.exports = defineConfig({
projectId: 'rgy1pi',
reporter: 'cypress-multi-reporters',
reporterOptions: {
configFile: 'reporter-config.json',
},
chromeWebSecurity: false,
viewportHeight: 800,
viewportWidth: 1280,
// numTestsKeptInMemory: 0,
// blockHosts: [
// "*.adobedtm.com",
// "*.googleadservices.com"
// ],
retries: {
runMode: 2,
openMode: 0,
},
userAgent: 'Cypress',
e2e: {
experimentalRunAllSpecs: true,
setupNodeEvents(on, config) {
// on task event to log messages is required for the @lambdatest/cypress-driver plugin to work
on('task', {
log(message) {
console.log(message);
return null;
},
});
config.env.ENV = process.env.ENV || 'production';
console.log(`Cypress running in ${config.env.ENV} environment`);
const environmentConfig = require(`./cypress/plugins/config/${config.env.ENV}.json`);
// const getCompareSnapshotsPlugin = require('cypress-image-diff-js/dist/plugin');
// getCompareSnapshotsPlugin(on, config);
return {
...config,
...environmentConfig,
};
},
},
});