Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade: Bump cypress-visual-regression from 3.0.0 to 5.0.0 #1575

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import { defineConfig } from 'cypress'

import vitePreprocessor from 'cypress-vite'
import getCompareSnapshotsPlugin from 'cypress-visual-regression/dist/plugin'
import { configureVisualRegression } from 'cypress-visual-regression/dist/plugin'

export default defineConfig({
projectId: '5bsgwk',
Expand All @@ -32,9 +32,10 @@ export default defineConfig({

// Visual regression testing
env: {
failSilently: false,
type: 'actual',
visualRegressionType: 'regression',
visualRegressionFailSilently: false,
},

screenshotsFolder: 'cypress/snapshots/actual',
trashAssetsBeforeRuns: true,

Expand All @@ -48,7 +49,7 @@ export default defineConfig({
on('file:preprocessor', vitePreprocessor({ configFile: false }))

// Enable the snapshot compare plugin
getCompareSnapshotsPlugin(on, config)
configureVisualRegression(on)

// Disable spell checking to prevent rendering differences
on('before:browser:launch', (browser, launchOptions) => {
Expand Down
5 changes: 4 additions & 1 deletion cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
*/
/* eslint-disable n/no-unpublished-import */
import { addCommands } from '@nextcloud/cypress'
import { addCompareSnapshotCommand } from 'cypress-visual-regression/dist/command'

// Add custom commands
import 'cypress-wait-until'

// Add custom commands
addCommands()
addCompareSnapshotCommand()
Loading
Loading