-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathcypress.config.js
More file actions
43 lines (39 loc) · 1.13 KB
/
cypress.config.js
File metadata and controls
43 lines (39 loc) · 1.13 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
const { defineConfig } = require("cypress");
const contextPath = process.env.QDB_HTTP_CONTEXT_WEB_CONSOLE || "";
const baseUrl = `http://localhost:9999${contextPath}`;
module.exports = defineConfig({
defaultCommandTimeout: 10000,
e2e: {
defaultCommandTimeout: 10000,
screenshotOnRunFailure: true,
screenshotsFolder: "e2e/screenshots",
videosFolder: "e2e/videos",
video: false,
baseUrl: baseUrl,
chromeWebSecurity: false, //if it is true, cypress does not allow redirects
viewportWidth: 1920,
viewportHeight: 1080,
specPattern: "e2e/tests/**/*.spec.js",
supportFile: "e2e/commands.js",
setupNodeEvents(on) {
on("before:browser:launch", (browser = {}, launchOptions) => {
if (browser.family === "chromium" && browser.name !== "electron") {
launchOptions.args.push(
"--high-dpi-support=1",
"--force-device-scale-factor=1"
);
}
return launchOptions;
});
on("task", {
log(message) {
console.log(message);
return null;
},
});
},
},
retries: {
runMode: 1,
},
});