-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cypress.config.ts
37 lines (33 loc) · 1019 Bytes
/
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
import { defineConfig } from 'cypress';
import Browser = Cypress.Browser;
const puppeteer = require('puppeteer');
const findPuppeteer: () => Promise<Browser> = async () => {
const browserPath = puppeteer.executablePath();
const browser = await puppeteer.launch();
const version = await browser.version();
const majorVersion = parseInt(version.split('/')[1]);
return {
name: 'chromium',
family: 'chromium',
displayName: `Puppeteer - ${version}`,
version: version,
majorVersion: majorVersion,
path: browserPath,
channel: 'stable',
isHeaded: false,
isHeadless: true,
};
};
export default defineConfig({
e2e: {
'baseUrl': 'http://localhost:4200',
supportFile: false,
video: false,
setupNodeEvents: (on, config) => {
return findPuppeteer().then((browser) => {
config.browsers.push(browser);
return config;
});
},
},
});