From c78bc355c7a66d87191b29feaa8c96ec4b121e09 Mon Sep 17 00:00:00 2001 From: Gery Hirschfeld Date: Mon, 5 Feb 2024 14:48:55 +0100 Subject: [PATCH] chore: hide scrollbar for visual test --- test/cypress/support/e2e.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/cypress/support/e2e.ts b/test/cypress/support/e2e.ts index 2373e4789d..171a04bad6 100644 --- a/test/cypress/support/e2e.ts +++ b/test/cypress/support/e2e.ts @@ -23,3 +23,12 @@ addCompareSnapshotCommand({ capture: 'fullPage', errorThreshold: 0.15, }) + +Cypress.Screenshot.defaults({ + onBeforeScreenshot($el) { + $el.css('overflow', 'hidden') + }, + onAfterScreenshot($el) { + $el.css('overflow', 'auto') + }, +})