-
Notifications
You must be signed in to change notification settings - Fork 0
/
cypress.config.mjs
44 lines (40 loc) · 1.18 KB
/
cypress.config.mjs
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
import { defineConfig } from 'cypress';
import coverageTask from '@cypress/code-coverage/task.js';
import dotenv from 'dotenv';
dotenv.config();
export default defineConfig({
e2e: {
baseUrl: 'http://localhost/',
experimentalRunAllSpecs: true,
trashAssetsBeforeRuns: true,
setupNodeEvents(on, config) {
coverageTask(on, config);
return config;
},
},
video: true,
screenshotsFolder: 'cypress/screenshots',
videosFolder: 'cypress/videos',
component: {
devServer: {
framework: 'react',
bundler: 'vite',
},
supportFile: 'cypress/support/component.jsx',
specPattern: 'src/**/*.cy.{js,jsx,ts,tsx}', // Specify the path to your component tests
numTestsKeptInMemory: 1,
experimentalMemoryManagement: true,
setupNodeEvents(on, config) {
coverageTask(on, config);
return config;
},
},
defaultCommandTimeout: 30000,
env: {
auth0_username: process.env.VITE_AUTH0_USERNAME,
auth0_password: process.env.VITE_AUTH0_PASSWORD,
auth0_domain: process.env.VITE_API_AUTH0_DOMAIN,
auth0_audience: process.env.VITE_API_AUTH0_AUDIENCE,
auth0_client_id: process.env.VITE_API_AUTH0_CLIENT_ID,
},
});