Skip to content

Commit

Permalink
Merge pull request #5358 from nextcloud/renovate/main-cypress-visual-…
Browse files Browse the repository at this point in the history
…regression-5.x

chore(deps): update dependency cypress-visual-regression to v5 (main)
  • Loading branch information
github-actions[bot] authored Feb 26, 2024
2 parents 0ef4767 + 4c546f7 commit 51a3752
Show file tree
Hide file tree
Showing 4 changed files with 455 additions and 15 deletions.
7 changes: 5 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 @@ -15,9 +15,12 @@ module.exports = defineConfig({
SNAPSHOT_DIFF_DIRECTORY: './cypress/snapshots/diff',
},
e2e: {
env: {
visualRegressionType: 'regression',
},
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
Loading

0 comments on commit 51a3752

Please sign in to comment.