forked from LIDR-academy/AI4Devs-qa-2509-R
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcypress.config.js
More file actions
36 lines (33 loc) · 1.04 KB
/
Copy pathcypress.config.js
File metadata and controls
36 lines (33 loc) · 1.04 KB
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
const { defineConfig } = require('cypress');
const createBundler = require('@bahmutov/cypress-esbuild-preprocessor');
const { addCucumberPreprocessorPlugin } = require('@badeball/cypress-cucumber-preprocessor');
const { createEsbuildPlugin } = require('@badeball/cypress-cucumber-preprocessor/esbuild');
module.exports = defineConfig({
e2e: {
baseUrl: 'http://localhost:3000',
specPattern: 'cypress/e2e/features/**/*.feature',
supportFile: 'cypress/support/e2e.js',
video: true,
screenshotOnRunFailure: true,
viewportWidth: 1280,
viewportHeight: 720,
defaultCommandTimeout: 10000,
requestTimeout: 10000,
responseTimeout: 10000,
async setupNodeEvents(on, config) {
// Add cucumber preprocessor plugin
await addCucumberPreprocessorPlugin(on, config);
// Add esbuild bundler
on(
'file:preprocessor',
createBundler({
plugins: [createEsbuildPlugin(config)],
})
);
return config;
},
},
env: {
apiUrl: 'http://localhost:3010',
},
});