Skip to content

Commit

Permalink
chore: hide scrollbar for visual test
Browse files Browse the repository at this point in the history
  • Loading branch information
hirsch88 committed Feb 5, 2024
1 parent c78bc35 commit a5d2183
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/cypress/support/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ addCompareSnapshotCommand({

Cypress.Screenshot.defaults({
onBeforeScreenshot($el) {
$el.css('overflow', 'hidden')
if ($el.is('html')) {
$el.css('overflow', 'hidden')
}
},
onAfterScreenshot($el) {
$el.css('overflow', 'auto')
if ($el.is('html')) {
$el.css('overflow', 'hidden scroll')
}
},
})

0 comments on commit a5d2183

Please sign in to comment.