-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathcypress.config.js
48 lines (39 loc) · 1.38 KB
/
cypress.config.js
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
import { defineConfig } from "cypress";
import configCodeCoverage from "@cypress/code-coverage/task.js";
import "dotenv/config";
const baseUrl = process.env.APP_URL || "http://localhost";
export default defineConfig({
downloadsFolder: "tests/Frontend/downloads",
fixturesFolder: "tests/Frontend/fixtures",
screenshotsFolder: "tests/Frontend/screenshots",
videosFolder: "tests/Frontend/videos",
e2e: {
setupNodeEvents(on, config) {
configCodeCoverage(on, config);
// include any other plugin code...
on("before:browser:launch", (browser, launchOptions) => {
if (browser.family === "chromium" && browser.name !== "electron") {
launchOptions.preferences.default.intl = {
acceptLanguages: "en",
accept_languages: "en",
selected_languages: "en",
};
return launchOptions;
}
if (browser.family === "firefox") {
launchOptions.preferences["intl.accept_languages"] = "en";
return launchOptions;
}
});
// It's IMPORTANT to return the config object
// with any changed environment variables
return config;
},
baseUrl: baseUrl,
experimentalStudio: true,
supportFile: "tests/Frontend/support/e2e.{js,jsx,ts,tsx}",
specPattern: "tests/Frontend/e2e/**/*.cy.{js,jsx,ts,tsx}",
},
viewportWidth: 1280,
viewportHeight: 800,
});