generated from graasp/graasp-repo
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcypress.config.ts
37 lines (35 loc) · 972 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 setupCoverage from '@cypress/code-coverage/task.js';
import { defineConfig } from 'cypress';
const ENV = {
VITE_GRAASP_REDIRECTION_HOST: process.env.VITE_GRAASP_REDIRECTION_HOST,
VITE_GRAASP_DOMAIN: process.env.VITE_GRAASP_DOMAIN,
VITE_GRAASP_API_HOST: process.env.VITE_GRAASP_API_HOST,
VITE_SHOW_NOTIFICATIONS: false,
VITE_GRAASP_LIBRARY_HOST: process.env.VITE_GRAASP_LIBRARY_HOST,
};
export default defineConfig({
e2e: {
retries: {
openMode: 0,
runMode: 1,
},
// needed for redirection tests to pass
chromeWebSecurity: false,
env: ENV,
setupNodeEvents(on, config) {
// implement node event listeners here
setupCoverage(on, config);
return config;
},
baseUrl: `http://localhost:${process.env.VITE_PORT ?? 3333}`,
defaultCommandTimeout: 7000,
requestTimeout: 8000,
},
component: {
devServer: {
framework: 'react',
bundler: 'vite',
},
env: ENV,
},
});