-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcypress.config.js
58 lines (57 loc) · 1.64 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
const { defineConfig } = require("cypress");
const webpackPreprocessor = require('@cypress/webpack-preprocessor');
const { addCucumberPreprocessorPlugin } = require('@badeball/cypress-cucumber-preprocessor');
const getCompareSnapshotsPlugin = require('cypress-image-diff-js/plugin');
module.exports = defineConfig({
e2e: {
specPattern: "cypress/features/**/*.feature",
baseUrl: 'https://es.wikipedia.org/',
async setupNodeEvents(on, config) {
await addCucumberPreprocessorPlugin(on, config);
const options = {
webpackOptions: {
module: {
rules: [
{
test: /\.feature$/,
use: [
{
loader: '@badeball/cypress-cucumber-preprocessor/webpack',
options: config,
},
],
},
],
},
},
}
on('file:preprocessor', webpackPreprocessor(options));
on("after:run", async () => {
console.log("override after:run");
});
return getCompareSnapshotsPlugin(on, config);
}
},
env: {
user: {
username: "VALID_ENVIRONMENT_USER",
password: "VALID_ENVIRONMENT_PASS",
},
},
video: true,
videosFolder: "results/videos",
screenshotsFolder: "results/screenshots",
reporter: "mochawesome",
reporterOptions: {
configFile: "cypress/reporter-config.json"
},
defaultCommandTimeout: 10000,
execTimeout: 10000,
taskTimeout: 10000,
pageLoadTimeout: 10000,
requestTimeout: 10000,
responseTimeout: 10000,
chromeWebSecurity: false,
viewportHeight: 1080,
viewportWidth: 1920,
});