-
Notifications
You must be signed in to change notification settings - Fork 500
/
cypress.config.ts
39 lines (33 loc) · 976 Bytes
/
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
38
39
import { defineConfig } from "cypress";
import fs from "fs";
import cypressSplit from "cypress-split";
export default defineConfig({
projectId: "wf7d2m",
defaultCommandTimeout: 10000,
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
require("cypress-localstorage-commands/plugin")(on, config); // eslint-disable-line
on("task", {
readFileMaybe(filename) {
if (fs.existsSync(filename)) {
return fs.readFileSync(filename, "utf8");
}
return null;
},
});
if (process.env.CYPRESS_SPLIT_TESTS === "true") {
cypressSplit(on, config);
}
return config;
},
baseUrl: "http://localhost:4000",
retries: 2,
requestTimeout: 15000,
excludeSpecPattern: "**/*roles.cy.ts",
},
env: {
API_URL: process.env.REACT_CARE_API_URL ?? "http://localhost:9000",
ENABLE_HCX: process.env.REACT_ENABLE_HCX ?? false,
},
});