This repository was archived by the owner on Aug 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcypress.config.ts
More file actions
50 lines (47 loc) · 1.39 KB
/
cypress.config.ts
File metadata and controls
50 lines (47 loc) · 1.39 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import { addCucumberPreprocessorPlugin } from "@badeball/cypress-cucumber-preprocessor";
import createEsbuildPlugin from "@badeball/cypress-cucumber-preprocessor/esbuild";
import createBundler from "@bahmutov/cypress-esbuild-preprocessor";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import { chromeAllowXSiteCookies, networkShim } from "@dhis2/cypress-plugins";
import { defineConfig } from "cypress";
async function cucumberPreprocessor(on, config) {
await addCucumberPreprocessorPlugin(on, config);
on(
"file:preprocessor",
createBundler({
plugin: createEsbuildPlugin(config),
})
);
}
export default defineConfig({
video: false,
projectId: "w8u5sk",
env: {
dhis2DataTestPrefix: "dhis2-react-ui",
networkMode: "live",
dhis2ApiVersion: "38",
},
experimentalInteractiveRunEvents: true,
component: {
supportFile: "cypress/support/component.ts",
setupNodeEvents: async (on, config) => {
networkShim(on, config);
chromeAllowXSiteCookies(on);
await cucumberPreprocessor(on, config);
},
devServer: {
framework: "react",
bundler: "vite",
viteConfig: {
jsx: "vite-react",
ts: true,
tsConfig: "tsconfig.json",
},
},
defaultCommandTimeout: 60000,
viewportHeight: 763,
viewportWidth: 1366,
specPattern: "src/**/*.test.{js,ts,jsx,tsx}",
},
});