-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcypress.config.ts
37 lines (36 loc) · 1.03 KB
/
cypress.config.ts
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
import { defineConfig } from "cypress";
import { addCucumberPreprocessorPlugin } from "@badeball/cypress-cucumber-preprocessor";
import browserify from "@badeball/cypress-cucumber-preprocessor/browserify";
// @ts-ignore
import mochawesome from "cypress-mochawesome-reporter/plugin";
async function setupNodeEvents(
on: Cypress.PluginEvents,
config: Cypress.PluginConfigOptions
): Promise<Cypress.PluginConfigOptions> {
on(
"file:preprocessor",
browserify(config, {
typescript: require.resolve("typescript"),
})
);
mochawesome(on);
await addCucumberPreprocessorPlugin(on, config);
return config;
}
export default defineConfig({
reporter: "cypress-mochawesome-reporter",
reporterOptions: {
charts: true,
reportPageTitle: "MMT Automation Report",
embeddedScreenshots: true,
inlineAssets: true,
saveAllAttempts: false,
reportDir: "cypress/reports/mochawesome",
// code: false
},
e2e: {
baseUrl: "https://duckduckgo.com",
specPattern: "**/*.feature",
setupNodeEvents,
},
});