-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcypress.config.js
38 lines (36 loc) · 1.01 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
const { defineConfig } = require("cypress");
const fs = require("fs");
const cypressSplit = require("cypress-split");
module.exports = defineConfig({
watchForFileChanges: false,
reporter: 'mochawesome',
reporterOptions: {
useInlineDiffs: true,
embeddedScreenshots: true,
reportDir: 'cypress/results',
reportFilename: '[name].html',
overwrite: true,
html: true,
json: true,
},
e2e: {
baseUrl: "https://the-internet.herokuapp.com",
setupNodeEvents(on, config) {
// implement node event listeners here
on("task", {
dynamicFiledownload: (downloadspath) => {
return fs.readdirSync(downloadspath);
},
});
on("before:run", (details) => {
if (details.specs && details.browser) {
// details.specs and details.browser will be undefined in interactive mode
// console.log(details.specs);
}
});
cypressSplit(on, config)
// IMPORTANT: return the config object
return config
},
},
});