-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcypress.config.mjs
More file actions
67 lines (55 loc) · 1.39 KB
/
cypress.config.mjs
File metadata and controls
67 lines (55 loc) · 1.39 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import { defineConfig } from 'cypress';
import vitePreprocessor from 'cypress-vite';
import { cypressConfig } from './vite.config.js';
import codeCoverageTask from '@cypress/code-coverage/task';
import fakerPlugin from './test/plugins/faker-generator.js';
fakerPlugin();
process.env.NODE_ENV = 'test';
function setupNodeEvents(on, config) {
on(
'file:preprocessor',
vitePreprocessor({
configFile: false,
...cypressConfig,
}),
);
codeCoverageTask(on, config);
return config;
}
export default defineConfig({
component: {
specPattern: 'src/**/*.cy.js',
indexHtmlFile: 'test/support/component.html',
supportFile: 'test/support/component.js',
setupNodeEvents,
devServer: {
framework: 'marionette',
bundler: 'vite',
},
},
e2e: {
baseUrl: 'http://localhost:8090/',
excludeSpecPattern: ['*.md', '*.import.js'],
specPattern: 'test/integration/**/*.js',
supportFile: 'test/support/e2e.js',
setupNodeEvents,
experimentalRunAllSpecs: true,
experimentalStudio: true,
},
env: {
featureFlags: {},
},
experimentalMemoryManagement: true,
numTestsKeptInMemory: 5,
retries: {
runMode: 1,
openMode: 0,
},
projectId: 'ep9zr6',
coverageFolder: 'coverage',
screenshotsFolder: 'test/reports/screenshots',
fixturesFolder: 'test/fixtures',
video: false,
viewportWidth: 1280,
viewportHeight: 768,
});