-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcypress.config.js
More file actions
29 lines (28 loc) · 886 Bytes
/
Copy pathcypress.config.js
File metadata and controls
29 lines (28 loc) · 886 Bytes
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
import { resolve } from 'node:path';
import { defineConfig } from 'cypress';
import vitePreprocessor from 'cypress-vite';
import { URL, fileURLToPath } from 'node:url';
export default defineConfig({
viewportWidth: 1024,
scrollBehavior: 'center',
e2e: {
supportFile: false,
experimentalStudio: true,
baseUrl: 'http://127.0.0.1:3000/image-editor',
specPattern: 'tests/cypress/e2e/**/*.cy.ts',
videosFolder: 'tests/cypress/videos',
fixturesFolder: 'tests/cypress/fixtures',
downloadsFolder: 'tests/cypress/downloads',
screenshotsFolder: 'tests/cypress/screenshots',
setupNodeEvents(on) {
on('file:preprocessor', vitePreprocessor({
resolve: {
alias: {
'@ts': resolve(fileURLToPath(new URL('./src/assets/ts', import.meta.url))),
'@types': resolve(fileURLToPath(new URL('./src/types.d.ts', import.meta.url))),
},
},
}));
},
},
});