summaryrefslogtreecommitdiffstats
path: root/cypress.config.ts
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2022-12-28 15:29:54 +0100
committerJohn Molakvoæ <skjnldsv@protonmail.com>2023-01-04 16:46:14 +0100
commit5b9a8f0407a9e3fe7e00f0fc9284ea986905f1b5 (patch)
tree1363678dab6ed5e1554a7a74bc8a6a1a55bdf785 /cypress.config.ts
parent8f1bf13ae3046400ce6248fb13e5515e8e9ed5c4 (diff)
downloadnextcloud-server-5b9a8f0407a9e3fe7e00f0fc9284ea986905f1b5.tar.gz
nextcloud-server-5b9a8f0407a9e3fe7e00f0fc9284ea986905f1b5.zip
Add component testing
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'cypress.config.ts')
-rw-r--r--cypress.config.ts30
1 files changed, 29 insertions, 1 deletions
diff --git a/cypress.config.ts b/cypress.config.ts
index b7c6934689a..02b0bbf2734 100644
--- a/cypress.config.ts
+++ b/cypress.config.ts
@@ -1,5 +1,12 @@
/* eslint-disable node/no-unpublished-import */
-import { applyChangesToNextcloud, configureNextcloud, preppingNextcloud, startNextcloud, stopNextcloud, waitOnNextcloud } from './cypress/dockerNode'
+
+import {
+ applyChangesToNextcloud,
+ configureNextcloud,
+ startNextcloud,
+ stopNextcloud,
+ waitOnNextcloud,
+} from './cypress/dockerNode'
import { defineConfig } from 'cypress'
import browserify from '@cypress/browserify-preprocessor'
@@ -29,6 +36,7 @@ export default defineConfig({
failSilently: false,
type: 'actual',
},
+
screenshotsFolder: 'cypress/snapshots/actual',
trashAssetsBeforeRuns: true,
@@ -82,4 +90,24 @@ export default defineConfig({
})
},
},
+
+ component: {
+ devServer: {
+ framework: 'vue',
+ bundler: 'webpack',
+ webpackConfig: async () => {
+ process.env.npm_package_name = 'NcCypress'
+ process.env.npm_package_version = '1.0.0'
+ process.env.NODE_ENV = 'development'
+
+ const config = require('@nextcloud/webpack-vue-config')
+ config.module.rules.push({
+ test: /\.svg$/,
+ type: 'asset/source',
+ })
+
+ return config
+ },
+ },
+ },
})