Skip to content

Commit

Permalink
test(cypress): Fix import from cypress-visual-regression
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Feb 26, 2024
1 parent 4309104 commit 27ddc24
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -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')
Expand Down
4 changes: 2 additions & 2 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 27ddc24

Please sign in to comment.