forked from opencollective/opencollective-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cypress.config.js
43 lines (39 loc) · 1.29 KB
/
cypress.config.js
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
// eslint-disable-next-line node/no-unpublished-require
const { defineConfig } = require('cypress');
module.exports = defineConfig({
viewportWidth: 1200,
viewportHeight: 1660,
projectId: 'yt5kwm',
defaultCommandTimeout: 15000,
responseTimeout: 60000,
video: false,
chromeWebSecurity: false,
scrollBehavior: 'center',
blockHosts: ['wtfismyip.com', 'images.opencollective.com', 'images-staging.opencollective.com', 'localhost:3001'],
env: {
MAILDEV_URL: 'http://localhost:1080',
codeCoverage: {
url: '/__coverage__',
},
},
fixturesFolder: 'test/cypress/fixtures',
screenshotsFolder: 'test/cypress/screenshots',
videosFolder: 'test/cypress/videos',
e2e: {
setupNodeEvents(on, config) {
// eslint-disable-next-line node/no-unpublished-require
require('@cypress/code-coverage/task')(on, config);
on('before:browser:launch', (browser, launchOptions) => {
if (browser.name === 'chrome') {
launchOptions.args.push('--lang=en-US');
}
});
config.baseUrl = process.env.WEBSITE_URL || 'http://localhost:3000';
config.env = config.env || {};
return config;
},
specPattern: 'test/cypress/integration',
supportFile: 'test/cypress/support/index.js',
baseUrl: 'http://localhost:3000',
},
});