Skip to content

Commit

Permalink
Merge pull request #1575 from nextcloud/dependabot/npm_and_yarn/cypre…
Browse files Browse the repository at this point in the history
…ss-visual-regression-5.0.0
  • Loading branch information
dependabot[bot] authored May 11, 2024
2 parents d543764 + 62dbf42 commit dce8e09
Show file tree
Hide file tree
Showing 4 changed files with 407 additions and 18 deletions.
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

0 comments on commit dce8e09

Please sign in to comment.