-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcypress.config.js
43 lines (39 loc) · 1.33 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
import { defineConfig } from "cypress";
import createBundler from "@bahmutov/cypress-esbuild-preprocessor";
import preprocessor from "@badeball/cypress-cucumber-preprocessor";
import createEsbuildPlugin from "@badeball/cypress-cucumber-preprocessor/esbuild.js";
export async function setupNodeEvents(on, config) {
// This is required for the preprocessor to be able to generate JSON reports after each run, and more,
await preprocessor.addCucumberPreprocessorPlugin(on, config);
on(
"file:preprocessor",
createBundler({
plugins: [createEsbuildPlugin.default(config)],
})
);
// Make sure to return the config object as it might have been modified by the plugin.
return config;
}
export default defineConfig({
e2e: {
baseUrl: "https://drupal.org",
specPattern: [
"cypress/**/*.feature",
"app/**/*.feature"
],
excludeSpecPattern: [
"example-tests/**/*.feature"
],
supportFile: false,
setupNodeEvents,
screenshotsFolder: "reports/screenshots",
videosFolder: "reports/videos",
video:false,
viewportWidth: 1920,
viewportHeight: 1080,
reporter: "junit",
reporterOptions: {
mochaFile: "reports/test-output-[hash].xml"
}
},
});