Skip to content

Commit

Permalink
fix(cy): add a little bit of error threshold.
Browse files Browse the repository at this point in the history
Signed-off-by: Max <[email protected]>
  • Loading branch information
max-nextcloud committed Feb 12, 2025
1 parent 404e5b7 commit 9fd638a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cypress/e2e/print.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('Open print.md and compare print view', function() {
.get('h1:not(.hidden-visually)').should('contain', 'Print test')
.should('be.visible')

cy.compareSnapshot('print view in viewer', { capture: 'fullPage' })
cy.compareSnapshot('print view in viewer')
cy.setCssMedia('screen')
})

Expand All @@ -45,7 +45,7 @@ describe('Open print.md and compare print view', function() {
.get('h1:not(.hidden-visually)').should('contain', 'Print test')
.should('be.visible')

cy.compareSnapshot('print view in single-file share', { capture: 'fullPage' })
cy.compareSnapshot('print view in single-file share')
cy.setCssMedia('screen')
})
})
Expand Down
5 changes: 4 additions & 1 deletion cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ import { addCompareSnapshotCommand } from 'cypress-visual-regression/dist/comman
// eslint-disable-next-line no-unused-vars,n/no-extraneous-import
import regeneratorRuntime from 'regenerator-runtime'

addCompareSnapshotCommand()
addCompareSnapshotCommand({
capture: 'fullPage',
errorThreshold: 0.01,
})

const url = Cypress.config('baseUrl').replace(/\/index.php\/?$/g, '')
Cypress.env('baseUrl', url)
Expand Down

0 comments on commit 9fd638a

Please sign in to comment.