-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcypress.config.js
48 lines (43 loc) · 1.19 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
import { defineConfig } from "cypress";
import vitePreprocessor from "cypress-vite";
import createBundler from "@bahmutov/cypress-esbuild-preprocessor";
import { addCucumberPreprocessorPlugin } from "@badeball/cypress-cucumber-preprocessor";
import { createEsbuildPlugin } from "@badeball/cypress-cucumber-preprocessor/esbuild";
import testomatioReporter from "@testomatio/reporter/lib/adapter/cypress-plugin/index.js";
async function setupNodeEvents(on, config) {
on("file:preprocessor", vitePreprocessor());
on(
"file:preprocessor",
createBundler({
plugins: [createEsbuildPlugin(config)],
})
);
await addCucumberPreprocessorPlugin(on, config);
testomatioReporter(on, config);
return config;
}
export default defineConfig({
projectId: 'kvdswy',
env: {
codeCoverage: {
exclude: "cypress/**/*.**",
},
},
reporter: "mocha-multi-reporters",
reporterOptions: {
configFile: "reporter-config.json",
},
viewportHeight: 700,
viewportWidth: 1400,
e2e: {
experimentalStudio: true,
specPattern: "cypress/e2e/features/*.feature",
setupNodeEvents,
},
component: {
devServer: {
framework: "react",
bundler: "vite",
},
},
});