-
Notifications
You must be signed in to change notification settings - Fork 111
Expand file tree
/
Copy pathcypress.config.ts
More file actions
57 lines (55 loc) · 1.64 KB
/
cypress.config.ts
File metadata and controls
57 lines (55 loc) · 1.64 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
import codeCoverageTask from '@cypress/code-coverage/task';
import { defineConfig } from 'cypress';
//todo: remove once officially supported by Cypress: https://github.com/cypress-io/cypress/issues/33078
const stripLegacyCypressOptimizeDepsPlugin = () => ({
name: 'cypress-vite8-compat',
config(config) {
if (config?.optimizeDeps?.esbuildOptions) {
delete config.optimizeDeps.esbuildOptions;
}
},
});
export default defineConfig({
env: {
codeCoverage: {
exclude: [
'cypress/**',
'**/src/interfaces/*',
'**/src/enums/*',
'**/*.stories.tsx',
'**/*.test.{ts,tsx}',
'**/node_modules/**',
'**/dist/**',
'packages/*/src/index.ts',
'packages/main/src/components/AnalyticalTable/types/*',
'packages/main/src/webComponents/**',
'packages/charts/src/resources/**',
],
},
},
component: {
setupNodeEvents(on, config) {
codeCoverageTask(on, config);
return config;
},
devServer: {
framework: 'react',
bundler: 'vite',
viteConfig: {
// passing `viteConfig` as an object makes Cypress set `configFile: false` internally
configFile: 'vite.config.ts',
// plugins from both configs are merged by Vite's `mergeConfig`
plugins: [stripLegacyCypressOptimizeDepsPlugin()],
},
},
experimentalRunAllSpecs: true,
excludeSpecPattern: ['**/e2e/**', ...(process.env.CI ? ['**/SelectDialog/**'] : [])],
},
includeShadowDom: true,
viewportWidth: 1920,
viewportHeight: 1080,
video: false,
screenshotOnRunFailure: false,
scrollBehavior: false,
allowCypressEnv: false,
});