diff --git a/cypress.config.js b/cypress.config.js index b2edb1c3dff..05e83cf291e 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -1,6 +1,6 @@ const { defineConfig } = require('cypress') const cypressSplit = require('cypress-split') -const getCompareSnapshotsPlugin = require('cypress-visual-regression/dist/plugin.js') +const { configureVisualRegression } = require('cypress-visual-regression/dist/plugin.js') module.exports = defineConfig({ projectId: 'hx9gqy', @@ -17,7 +17,7 @@ module.exports = defineConfig({ e2e: { setupNodeEvents(on, config) { cypressSplit(on, config) - getCompareSnapshotsPlugin(on, config) + configureVisualRegression(on) const browserify = require('@cypress/browserify-preprocessor') const webpack = require('@cypress/webpack-preprocessor') diff --git a/cypress/support/commands.js b/cypress/support/commands.js index edcd59375c8..a205199112e 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -22,12 +22,12 @@ import axios from '@nextcloud/axios' import { addCommands } from '@nextcloud/cypress' -import compareSnapshotCommand from 'cypress-visual-regression/dist/command.js' +import { addCompareSnapshotCommand } from 'cypress-visual-regression/dist/command.js' // eslint-disable-next-line no-unused-vars,n/no-extraneous-import import regeneratorRuntime from 'regenerator-runtime' -compareSnapshotCommand() +addCompareSnapshotCommand() const url = Cypress.config('baseUrl').replace(/\/index.php\/?$/g, '') Cypress.env('baseUrl', url)