-
Notifications
You must be signed in to change notification settings - Fork 5
/
cypress.config.ts
70 lines (65 loc) · 1.59 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import { defineConfig } from "cypress";
import { cypressBrowserPermissionsPlugin } from "cypress-browser-permissions";
import { afterRunHook, beforeRunHook } from "cypress-mochawesome-reporter/lib";
export default defineConfig({
defaultCommandTimeout: 20000,
viewportWidth: 1440,
viewportHeight: 733,
retries: 3,
video: false,
experimentalMemoryManagement: true,
env: {
browserPermissions: {
notifications: "allow",
geolocation: "allow"
}
},
chromeWebSecurity: false,
e2e: {
setupNodeEvents(on, config) {
on("task", {
/* Logging */
log(message) {
console.log(message);
return null;
}
});
on("before:run", async details => {
console.log("override before:run");
await beforeRunHook(details);
});
on("after:run", async () => {
console.log("override after:run");
await afterRunHook();
});
// eslint-disable-next-line no-param-reassign
config = cypressBrowserPermissionsPlugin(on, config);
return config;
},
specPattern: "./cypress/e2e/**/*.cy.{js,jsx,ts,tsx}",
supportFile: "cypress/support/index.js",
reporter: "cypress-mochawesome-reporter",
reporterOptions: {
reportDir: "cypress/reports",
charts: true,
reportPageTitle: "ALS E2E Report",
embeddedScreenshots: true,
inlineAssets: true
},
chromeWebSecurity: false,
env: {
browserPermissions: {
notifications: "allow",
geolocation: "allow",
camera: "block",
microphone: "block",
images: "allow",
javascript: "allow",
popups: "allow",
plugins: "allow",
cookies: "allow",
chromeWebSecurity: false
}
}
}
});