Skip to content

Commit 349444d

Browse files
fix: cypress config
Signed-off-by: Luka Trovic <luka@nextcloud.com>
1 parent ab7ba8f commit 349444d

3 files changed

Lines changed: 1340 additions & 398 deletions

File tree

‎cypress.config.js‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
1-
const { defineConfig } = require('cypress')
2-
const cypressSplit = require('cypress-split')
1+
import vue from '@vitejs/plugin-vue2'
2+
import { defineConfig } from 'cypress'
3+
import cypressSplit from 'cypress-split'
4+
import vitePreprocessor from 'cypress-vite'
5+
import { nodePolyfills } from 'vite-plugin-node-polyfills'
36

4-
module.exports = defineConfig({
7+
export default defineConfig({
58
projectId: '1s7wkc',
69
viewportWidth: 1280,
710
viewportHeight: 720,
811
e2e: {
912
// We've imported your old cypress plugins here.
1013
// You may want to clean this up later by importing these.
1114
setupNodeEvents(on, config) {
15+
on(
16+
'file:preprocessor',
17+
vitePreprocessor({
18+
plugins: [vue(), nodePolyfills()],
19+
configFile: false,
20+
}),
21+
)
1222
cypressSplit(on, config)
13-
require('./cypress/plugins/index.js')(on, config)
1423
return config
1524
},
1625
baseUrl: 'http://nextcloud.local/index.php',

0 commit comments

Comments
 (0)