-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcypress.config.js
More file actions
43 lines (37 loc) · 964 Bytes
/
cypress.config.js
File metadata and controls
43 lines (37 loc) · 964 Bytes
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
// ./cypress.config.js
const { defineConfig } = require('cypress');
const webpackPreprocessor = require('@cypress/webpack-preprocessor');
const { addCucumberPreprocessorPlugin } = require('@badeball/cypress-cucumber-preprocessor');
async function 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));
return config;
}
module.exports = {
default: defineConfig({
e2e: {
specPattern: '**/*.feature',
baseUrl: 'http://localhost:3000',
supportFile: false,
setupNodeEvents,
},
}),
setupNodeEvents,
};