-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcypress.config.js
39 lines (36 loc) · 1.03 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
require('@babel/register')({
presets: [['@babel/preset-env', { targets: { node: 'current' } }]],
});
const { defineConfig } = require('cypress');
const appConfig = require('./app/assets/scripts/config').default;
const { startMockWsServer } = require('cypress-websocket-server');
module.exports = defineConfig({
experimentalFetchPolyfill: true,
chromeWebSecurity: false,
defaultCommandTimeout: 7000,
video: false,
viewportHeight: 800,
e2e: {
baseUrl: 'http://localhost:9000/',
excludeSpecPattern: [
'**/gpu.cy.js',
'**/stress-live-api.cy.js',
'**/keyboard-shortcuts.cy.js',
'**/layers-panel.cy.js',
'**/panel.cy.js',
'**/retrain.cy.js',
'**/sec-panel.cy.js',
'**/aois.cy.js',
'**/new.cy.js',
],
setupNodeEvents(on, cypressConfig) {
startMockWsServer(cypressConfig);
// Pass app config to Cypress tests
return {
...cypressConfig,
restApiEndpoint: appConfig.restApiEndpoint,
apiToken: appConfig.apiToken,
};
},
},
});