forked from cuttle-cards/cuttle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcypress.config.js
39 lines (38 loc) · 1.35 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
const { defineConfig } = require('cypress');
module.exports = defineConfig({
projectId: 'i8bxr8',
// https://docs.cypress.io/guides/references/configuration#e2e
e2e: {
baseUrl: process.env.VITE_API_URL || 'http://localhost:8080',
specPattern: ['tests/e2e/specs/**/*.spec.js'],
excludeSpecPattern: ['tests/e2e/specs/playground.spec.js'],
supportFile: 'tests/e2e/support/index.js',
// https://github.com/javierbrea/cypress-fail-fast
setupNodeEvents(on, config) {
require('cypress-fail-fast/plugin')(on, config);
// Log errors to the terminal console
// Also requires the log to be overridden in commands.js
// See https://github.com/cypress-io/cypress/issues/3199#issuecomment-1019270203
// on('task', {
// log(message) {
// console.log(`[log]: ${message}`);
// return null;
// },
// });
return config;
},
},
// Retry tests 2 times headlessly, no retries in UI
retries: {
runMode: 2,
openMode: 0,
},
numTestsKeptInMemory: 25,
// https://docs.cypress.io/guides/references/configuration#Videos
video: false,
// https://docs.cypress.io/guides/references/configuration#Folders-Files
downloadsFolder: 'tests/e2e/downloads',
fixturesFolder: 'tests/e2e/fixtures',
screenshotsFolder: 'tests/e2e/screenshots',
videosFolder: 'tests/e2e/videos',
});