2024-05-03 18:53:07 +03:00
|
|
|
/**
|
|
|
|
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
*/
|
|
|
|
|
2024-02-06 20:31:38 +03:00
|
|
|
import { defineConfig } from 'cypress'
|
|
|
|
import cypressSplit from 'cypress-split'
|
2024-09-06 18:12:02 +03:00
|
|
|
import { configureVisualRegression } from 'cypress-visual-regression/dist/plugin'
|
2024-05-14 12:36:56 +03:00
|
|
|
import vitePreprocessor from 'cypress-vite'
|
2024-05-14 15:58:44 +03:00
|
|
|
import { nodePolyfills } from 'vite-plugin-node-polyfills'
|
2024-05-14 12:36:56 +03:00
|
|
|
import vue from '@vitejs/plugin-vue2'
|
2024-02-06 20:31:38 +03:00
|
|
|
|
|
|
|
export default defineConfig({
|
2022-06-08 15:02:09 +03:00
|
|
|
projectId: 'hx9gqy',
|
|
|
|
viewportWidth: 1280,
|
|
|
|
viewportHeight: 900,
|
2023-11-29 17:47:18 +03:00
|
|
|
screenshotsFolder: './cypress/snapshots/actual',
|
|
|
|
trashAssetsBeforeRuns: true,
|
|
|
|
env: {
|
|
|
|
failSilently: false,
|
|
|
|
type: 'actual',
|
|
|
|
},
|
2022-06-08 15:02:09 +03:00
|
|
|
e2e: {
|
2024-02-26 14:16:33 +03:00
|
|
|
env: {
|
|
|
|
visualRegressionType: 'regression',
|
|
|
|
},
|
2022-06-08 15:02:09 +03:00
|
|
|
setupNodeEvents(on, config) {
|
2024-05-14 12:36:56 +03:00
|
|
|
on('file:preprocessor', vitePreprocessor({
|
2024-05-14 15:58:44 +03:00
|
|
|
plugins: [vue(), nodePolyfills()],
|
2024-05-14 12:36:56 +03:00
|
|
|
configFile: false,
|
|
|
|
}))
|
2023-10-11 21:14:03 +03:00
|
|
|
cypressSplit(on, config)
|
2024-02-26 14:16:33 +03:00
|
|
|
configureVisualRegression(on)
|
2023-10-11 21:14:03 +03:00
|
|
|
|
|
|
|
return config
|
2022-06-08 15:02:09 +03:00
|
|
|
},
|
2022-06-25 01:10:50 +03:00
|
|
|
|
2022-06-08 15:02:09 +03:00
|
|
|
baseUrl: 'http://localhost:8081/index.php/',
|
|
|
|
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
|
|
|
|
},
|
2024-01-17 22:28:29 +03:00
|
|
|
component: {
|
|
|
|
devServer: {
|
|
|
|
framework: "vue",
|
2024-02-06 20:31:38 +03:00
|
|
|
bundler: "vite",
|
2024-01-17 22:28:29 +03:00
|
|
|
},
|
|
|
|
},
|
2022-08-31 11:22:36 +03:00
|
|
|
retries: {
|
2022-09-26 17:58:03 +03:00
|
|
|
runMode: 2,
|
2022-08-31 11:22:36 +03:00
|
|
|
// do not retry in `cypress open`
|
2022-09-26 17:58:03 +03:00
|
|
|
openMode: 0,
|
2022-08-31 11:22:36 +03:00
|
|
|
},
|
2023-11-29 17:47:18 +03:00
|
|
|
'numTestsKeptInMemory': 5,
|
2022-06-01 22:58:06 +03:00
|
|
|
})
|