-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcypress.config.ts
More file actions
56 lines (54 loc) · 1.62 KB
/
Copy pathcypress.config.ts
File metadata and controls
56 lines (54 loc) · 1.62 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
// @ts-nocheck
import { defineConfig } from 'cypress';
export default defineConfig({
e2e: {
baseUrl: 'http://localhost:4200/',
allowCypressEnv: false,
setupNodeEvents(on, config) {
on('task', {
log(message) {
console.log(message);
return null;
},
});
on('before:browser:launch', (browser = {}, launchOptions) => {
if ((browser.family === 'chromium' || browser.name === 'chrome') && browser.name !== 'electron') {
launchOptions.args.push('--no-sandbox');
launchOptions.args.push('--disable-setuid-sandbox');
launchOptions.args.push('--disable-dev-shm-usage');
launchOptions.args.push('--disable-gpu');
}
return launchOptions;
});
return config;
},
},
env: {
CYPRESS_TEST: true,
},
defaultCommandTimeout: 15000,
includeShadowDom: true,
chromeWebSecurity: false,
watchForFileChanges: true,
viewportWidth: 3000,
viewportHeight: 1500,
component: {
devServer: {
framework: 'angular',
bundler: 'webpack',
},
specPattern: 'cypress/**/*.cy.ts',
setupNodeEvents(on, config) {
on('before:browser:launch', (browser = {}, launchOptions) => {
if ((browser.family === 'chromium' || browser.name === 'chrome') && browser.name !== 'electron') {
launchOptions.args.push('--no-sandbox');
launchOptions.args.push('--disable-setuid-sandbox');
launchOptions.args.push('--disable-dev-shm-usage');
launchOptions.args.push('--disable-gpu');
}
return launchOptions;
});
return config;
},
},
});