-
Notifications
You must be signed in to change notification settings - Fork 92
/
cypress.config.mjs
53 lines (49 loc) · 1.22 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
45
46
47
48
49
50
51
52
53
/**
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { defineConfig } from 'cypress'
import cypressSplit from 'cypress-split'
import { configureVisualRegression } from 'cypress-visual-regression/dist/plugin'
import vitePreprocessor from 'cypress-vite'
import { nodePolyfills } from 'vite-plugin-node-polyfills'
import vue from '@vitejs/plugin-vue2'
export default defineConfig({
projectId: 'hx9gqy',
viewportWidth: 1280,
viewportHeight: 900,
screenshotsFolder: './cypress/snapshots/actual',
trashAssetsBeforeRuns: true,
env: {
failSilently: false,
type: 'actual',
},
e2e: {
env: {
visualRegressionType: 'regression',
},
setupNodeEvents(on, config) {
on('file:preprocessor', vitePreprocessor({
plugins: [vue(), nodePolyfills()],
configFile: false,
}))
cypressSplit(on, config)
configureVisualRegression(on)
return config
},
baseUrl: 'http://localhost:8081/index.php/',
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
},
component: {
devServer: {
framework: "vue",
bundler: "vite",
},
},
retries: {
runMode: 2,
// do not retry in `cypress open`
openMode: 0,
},
'numTestsKeptInMemory': 5,
})