From 27ddc24d2e94786a03597eb440023e70ebd915ab Mon Sep 17 00:00:00 2001 From: Jonas Date: Mon, 26 Feb 2024 12:16:33 +0100 Subject: [PATCH] test(cypress): Fix import from `cypress-visual-regression` Signed-off-by: Jonas --- cypress.config.js | 4 ++-- cypress/support/commands.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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)