Skip to content

Commit

Permalink
Merge pull request #2199 from nextcloud/renovate/master-major-cypress
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv authored Mar 9, 2024
2 parents 0445bea + e4a36a9 commit e2c7f0c
Show file tree
Hide file tree
Showing 4 changed files with 217 additions and 15 deletions.
7 changes: 3 additions & 4 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { configureNextcloud, startNextcloud, stopNextcloud, waitOnNextcloud } from '@nextcloud/cypress/docker'
import { configureVisualRegression } from 'cypress-visual-regression/dist/plugin'
import { defineConfig } from 'cypress'
import cypressSplit from 'cypress-split'

import getCompareSnapshotsPlugin from 'cypress-visual-regression/dist/plugin'

export default defineConfig({
projectId: 'xysa6x',
Expand All @@ -27,7 +27,7 @@ export default defineConfig({
// Visual regression testing
env: {
failSilently: false,
type: 'actual',
visualRegressionType: 'regression',
},
screenshotsFolder: 'cypress/snapshots/actual',
trashAssetsBeforeRuns: true,
Expand All @@ -40,8 +40,7 @@ export default defineConfig({
// You may want to clean this up later by importing these.
async setupNodeEvents(on, config) {
cypressSplit(on, config)

getCompareSnapshotsPlugin(on, config)
configureVisualRegression(on)

// Disable spell checking to prevent rendering differences
on('before:browser:launch', (browser, launchOptions) => {
Expand Down
4 changes: 2 additions & 2 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
import { addCommands, User } from '@nextcloud/cypress'
import { basename } from 'path'
import axios from '@nextcloud/axios'
import compareSnapshotCommand from 'cypress-visual-regression/dist/command.js'
import { addCompareSnapshotCommand } from 'cypress-visual-regression/dist/command'

addCommands()
compareSnapshotCommand()
addCompareSnapshotCommand()

const url = Cypress.config('baseUrl').replace(/\/index.php\/?$/g, '')
Cypress.env('baseUrl', url)
Expand Down
215 changes: 209 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e2c7f0c

Please sign in to comment.