fix: Adjust cypress config

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
Ferdinand Thiessen 2024-02-04 01:17:01 +01:00
parent d72c5e670d
commit ef2cbaa0ec
No known key found for this signature in database
GPG Key ID: 45FAE7268762B400
2 changed files with 4 additions and 2 deletions

View File

@ -8,7 +8,7 @@ import {
import { defineConfig } from 'cypress'
import browserify from '@cypress/browserify-preprocessor'
import getCompareSnapshotsPlugin from 'cypress-visual-regression/dist/plugin'
import { configureVisualRegression } from 'cypress-visual-regression/dist/plugin'
export default defineConfig({
projectId: 'okzqgr',
@ -47,7 +47,7 @@ export default defineConfig({
async setupNodeEvents(on, config) {
// Fix browserslist extend https://github.com/cypress-io/cypress/issues/2983#issuecomment-570616682
on('file:preprocessor', browserify({ typescript: require.resolve('typescript') }))
getCompareSnapshotsPlugin(on, config)
configureVisualRegression(on)
// Disable spell checking to prevent rendering differences
on('before:browser:launch', (browser, launchOptions) => {

View File

@ -22,11 +22,13 @@
/* eslint-disable n/no-unpublished-import */
import axios from '@nextcloud/axios'
import { addCommands, User } from '@nextcloud/cypress'
import { addCompareSnapshotCommand } from 'cypress-visual-regression/dist/command'
import { basename } from 'path'
// Add custom commands
import 'cypress-wait-until'
addCommands()
addCompareSnapshotCommand()
// Register this file's custom commands types
declare global {