-
Notifications
You must be signed in to change notification settings - Fork 6
/
synpress.config.ts
52 lines (46 loc) · 1.38 KB
/
synpress.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
45
46
47
48
49
50
51
52
import path from 'path';
import 'colors';
import {defineConfig} from 'cypress';
const synpressPath = path.join(
process.cwd(),
'../node_modules/@synthetixio/synpress',
);
console.log(
`Detected synpress root path is: ${synpressPath}`.green.underline.bold,
);
const pluginsPath = `${synpressPath}/plugins/index`;
console.log(
`Detected synpress plugin path is: ${pluginsPath}`.yellow.underline.bold,
);
// eslint-disable-next-line @typescript-eslint/no-var-requires
const setupNodeEvents = require(pluginsPath);
const fixturesFolder = `${synpressPath}/fixtures`;
console.log(
`Detected synpress fixtures path is: ${fixturesFolder}`.gray.underline.bold,
);
const supportFile = 'cypress/support/e2e.ts';
export default defineConfig({
userAgent: 'synpress',
retries: {
runMode: process.env.CI ? 1 : 0,
openMode: 0,
},
fixturesFolder,
chromeWebSecurity: true,
viewportWidth: 1920,
viewportHeight: 1080,
video: false,
env: {
coverage: false,
},
defaultCommandTimeout: process.env.SYNDEBUG ? 9999999 : 30000,
pageLoadTimeout: process.env.SYNDEBUG ? 9999999 : 30000,
requestTimeout: process.env.SYNDEBUG ? 9999999 : 30000,
e2e: {
testIsolation: false,
setupNodeEvents,
baseUrl: 'http://localhost:3000',
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
supportFile,
},
});