From 9ce63a8a9cabd4fbb016caad48f443dd4836f424 Mon Sep 17 00:00:00 2001 From: JJ Adonis Date: Thu, 11 Nov 2021 15:31:16 +0800 Subject: [PATCH] update height and width values of Cypress config Starting Cypress 9, it will throw an error if Cypress.config validation is incorrect. Reference - https://github.com/cypress-io/cypress/pull/18589 --- src/command.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/command.js b/src/command.js index b65fd8a..f8498de 100644 --- a/src/command.js +++ b/src/command.js @@ -1,6 +1,6 @@ const compareSnapshotCommand = defaultScreenshotOptions => { - const height = process.env.HEIGHT || '1440' - const width = process.env.WIDTH || '1980' + const height = process.env.HEIGHT || 1440 + const width = process.env.WIDTH || 1980 // Force screenshot resolution to keep consistency of test runs across machines Cypress.config('viewportHeight', height)