-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathcypress.config.js
More file actions
79 lines (71 loc) 路 2.25 KB
/
Copy pathcypress.config.js
File metadata and controls
79 lines (71 loc) 路 2.25 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
const { defineConfig } = require("cypress");
module.exports = defineConfig({
e2e: {
specPattern: "cypress/e2e/plugins/index-management-dashboards-plugin/*.{js,jsx,ts,tsx}",
baseUrl: "http://localhost:5601",
// Timeouts
defaultCommandTimeout: 60000,
requestTimeout: 60000,
responseTimeout: 60000,
// Lighter footprint in CI
viewportWidth: 1280,
viewportHeight: 900,
video: false,
screenshotOnRunFailure: true,
retries: 1,
// Performance knobs
numTestsKeptInMemory: 0,
experimentalMemoryManagement: true,
// Environment variables
env: {
openSearchUrl: "http://localhost:9200",
SECURITY_ENABLED: false,
username: "admin",
password: "admin",
},
// Certificate configurations
clientCertificates: [
{
url: "https://localhost:9200/.opendistro-ism*",
ca: ["cypress/resources/root-ca.pem"],
certs: [
{
cert: "cypress/resources/kirk.pem",
key: "cypress/resources/kirk-key.pem",
passphrase: "",
},
],
},
{
url: "https://localhost:9200/.opendistro-ism-config/_update_by_query/",
ca: ["cypress/resources/root-ca.pem"],
certs: [
{
cert: "cypress/resources/kirk.pem",
key: "cypress/resources/kirk-key.pem",
passphrase: "",
},
],
},
],
setupNodeEvents(on, config) {
// Harden Chrome for CI; avoid Electron/Chrome renderer OOMs.
on("before:browser:launch", (browser = {}, launchOptions) => {
if (browser.family === "chromium") {
// Increase V8 heap for test app JS
launchOptions.args.push("--js-flags=--max-old-space-size=262144");
// CI stability flags
launchOptions.args.push("--disable-dev-shm-usage");
launchOptions.args.push("--no-sandbox");
launchOptions.args.push("--disable-gpu");
launchOptions.args.push("--disable-software-rasterizer");
launchOptions.args.push("--disable-features=VizDisplayCompositor");
// Modern headless is a bit leaner
launchOptions.args.push("--headless=new");
}
return launchOptions;
});
return config;
},
},
});