-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcypress.config.js
41 lines (33 loc) · 1.13 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
const { defineConfig } = require("cypress");
const createBundler = require("@bahmutov/cypress-esbuild-preprocessor");
const addCucumberPreprocessorPlugin = require("@badeball/cypress-cucumber-preprocessor").addCucumberPreprocessorPlugin;
const createEsbuildPlugin = require("@badeball/cypress-cucumber-preprocessor/esbuild").createEsbuildPlugin;
//If using this approach, just call the key "setupNodeEvents" in the E2E configurations
// async function setupNodeEvents(on, config) {
// await addCucumberPreprocessorPlugin(on, config);
// on(
// "file:preprocessor",
// createBundler({
// plugins: [createEsbuildPlugin(config)],
// })
// );
// return config;
// }
module.exports = defineConfig({
e2e: {
async setupNodeEvents(on, config) {
const bundler = createBundler({
plugins: [createEsbuildPlugin(config)],
});
on("file:preprocessor", bundler);
await addCucumberPreprocessorPlugin(on, config);
return config;
},
specPattern: "cypress/e2e/features/*.feature",
chromeWebSecurity: false,
env: {
requestMode: true
},
experimentalRunAllSpecs: true
},
});