-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcypress.config.ts
44 lines (41 loc) · 1.07 KB
/
cypress.config.ts
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
import { defineConfig } from 'cypress';
export default defineConfig({
e2e: {
baseUrl: 'https://mostly.ai',
setupNodeEvents(on) {
// new chrome headless doesn't play nice with cypress. Use old
// https://github.com/cypress-io/cypress/issues/8606
on(
'before:browser:launch',
(
browser = {
name: '',
family: 'chromium',
channel: '',
displayName: '',
version: '',
majorVersion: '',
path: '',
isHeaded: false,
isHeadless: false,
},
launchOptions,
) => {
if (browser.name === 'chrome' && browser.isHeadless) {
launchOptions.args = launchOptions.args.map((arg) => {
if (arg === '--headless=new') {
return '--headless';
}
return arg;
});
}
return launchOptions;
},
);
},
},
reporter: 'nyan',
watchForFileChanges: false,
viewportWidth: 1920,
viewportHeight: 1080,
});