diff --git a/commands.js b/commands.js index 26b6d09..bd5bff3 100644 --- a/commands.js +++ b/commands.js @@ -145,10 +145,17 @@ let takeScreenshot = (element, name, modifiedOptions) => { if (numScrolls <= 1) { // Check if the webpage is not scrollable - cy.task('logger', {type: 'warn', message: `the webpage is not scrollable, not able to lazyload "${imageName}", taking regular screenshot`}); + if (modifiedOptions.lazyload) { + // Warn if the webpage is not scrollable, and user is trying to lazyload + cy.task('logger', {type: `warn`, message: `the webpage is not scrollable, not able to lazyload "${imageName}", taking regular screenshot`}); + } + else { + // No need to throw warning if not lazyload + cy.task('logger', {type: `info`, message: `the webpage is not scrollable for image: "${imageName}", taking regular screenshot`}); + } } else if (modifiedOptions.scrollMethod === "JS_SCROLL") { // If the user wants to use the old JS_SCROLL method - cy.task('logger', {type: 'warn', message: `the webpage is not scrollable, not able to lazyload "${imageName}", taking regular screenshot`}); + cy.task('logger', {type: 'info', message: `Passed in 'scrollMethod= "JS_SCROLL"' taking regular screenshot`}); } else { // No errors so far if ((modifiedOptions.lazyload !== undefined) && (modifiedOptions.lazyload > 10000 || modifiedOptions.lazyload < 0 || isNaN(modifiedOptions.lazyload))){ diff --git a/qa/package-lock.json b/qa/package-lock.json index 608516f..7221611 100644 --- a/qa/package-lock.json +++ b/qa/package-lock.json @@ -15,7 +15,7 @@ }, "..": { "name": "@smartbear/visualtest-cypress", - "version": "1.1.0", + "version": "1.2.0", "license": "ISC", "dependencies": { "axios": "^1.3.4", @@ -23,7 +23,7 @@ "dotenv": "^16.0.3", "jimp": "^0.22.7", "pino": "^8.11.0", - "pino-pretty": "^9.4.0", + "pino-pretty": "^10.0.0", "uuid": "^9.0.0" }, "bin": { @@ -1836,7 +1836,7 @@ "dotenv": "^16.0.3", "jimp": "^0.22.7", "pino": "^8.11.0", - "pino-pretty": "^9.4.0", + "pino-pretty": "^10.0.0", "uuid": "^9.0.0" } },