-
Notifications
You must be signed in to change notification settings - Fork 142
Expand file tree
/
Copy pathcypress.config.js
More file actions
109 lines (105 loc) · 3.4 KB
/
Copy pathcypress.config.js
File metadata and controls
109 lines (105 loc) · 3.4 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
const { defineConfig } = require('cypress');
module.exports = defineConfig({
chromeWebSecurity: false,
defaultCommandTimeout: 60000,
requestTimeout: 60000,
responseTimeout: 60000,
video: true,
reporter: 'cypress-multi-reporters',
reporterOptions: {
configFile: 'reporter-config.json',
},
viewportWidth: 2000,
viewportHeight: 1320,
env: {
openSearchUrl: 'http://localhost:9200',
remoteDataSourceNoAuthUrl: 'http://localhost:9201',
remoteDataSourceBasicAuthUrl: 'https://localhost:9202',
remoteDataSourceBasicAuthUsername: 'admin',
remoteDataSourceBasicAuthPassword: 'myStrongPassword123!',
SECURITY_ENABLED: false,
AGGREGATION_VIEW: false,
MULTITENANCY_ENABLED: true,
username: 'admin',
password: 'myStrongPassword123!',
ENDPOINT_WITH_PROXY: false,
MANAGED_SERVICE_ENDPOINT: false,
VISBUILDER_ENABLED: true,
DATASOURCE_MANAGEMENT_ENABLED: false,
BANNER_ENABLED: false,
ML_COMMONS_DASHBOARDS_ENABLED: true,
WAIT_FOR_LOADER_BUFFER_MS: 0,
DASHBOARDS_ASSISTANT_ENABLED: false,
WORKSPACE_ENABLED: false,
SAVED_OBJECTS_PERMISSION_ENABLED: false,
DASHBOARDS_INVESTIGATION_ENABLED: true,
DISABLE_LOCAL_CLUSTER: false,
SECURITY_CERT_PATH: 'cypress/resources/kirk.pem',
SECURITY_KEY_PATH: 'cypress/resources/kirk-key.pem',
browserPermissions: {
clipboard: 'allow',
},
UIMETRIC_ENABLED: false,
},
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: '',
},
],
},
],
e2e: {
testIsolation: false,
specPattern: 'cypress/integration/**/*.{js,jsx,ts,tsx,json}',
supportFile: 'cypress/support/index.js',
experimentalMemoryManagement: true,
numTestsKeptInMemory: 0,
setupNodeEvents(on, config) {
on('before:browser:launch', (browser = {}, launchOptions) => {
if (browser.family === 'chromium') {
launchOptions.args.push('--js-flags=--max-old-space-size=4096');
launchOptions.args.push('--disable-gpu');
launchOptions.args.push('--use-gl=swiftshader');
launchOptions.args.push(
'--disable-features=IsolateOrigins,site-per-process,Vulkan,VulkanFromANGLE,UseSkiaRenderer'
);
launchOptions.args.push('--no-sandbox');
launchOptions.args.push('--disable-dev-shm-usage');
launchOptions.args.push('--disable-renderer-backgrounding');
launchOptions.args.push('--disable-background-timer-throttling');
launchOptions.args.push('--disable-backgrounding-occluded-windows');
}
return launchOptions;
});
try {
const result = require('./cypress/plugins/index.js')(on, config);
return result || config;
} catch (e) {
return config;
}
},
baseUrl: 'http://localhost:5601',
excludeSpecPattern: ['*.hot-update.js'],
},
});