diff --git a/commands.js b/commands.js index 9d377fa..7a1049b 100644 --- a/commands.js +++ b/commands.js @@ -548,6 +548,8 @@ const takeAllTheViewportScreenshots = (win, scrollArray, numScrolls, viewportHei imageData.width = newImageData.width imageData.height = newImageData.height + if (vtConfFile.debug) cy.task('copy', {path: imageData.path, imageName: imageName, imageType, reduced: true}); + takeTheStitchImage(imageData, win, initialPageState, newImageData.deletePath) }) } else { diff --git a/package-lock.json b/package-lock.json index 0fa5054..bf1c8f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@smartbear/visualtest-cypress", - "version": "1.9.1", + "version": "1.9.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@smartbear/visualtest-cypress", - "version": "1.9.1", + "version": "1.9.2", "license": "ISC", "dependencies": { - "axios": "^1.6.6", + "axios": "^1.6.7", "chalk": "^4.1.2", "dotenv": "^16.4.1", "fs-extra": "^11.2.0", @@ -24,8 +24,8 @@ }, "devDependencies": { "@types/fs-extra": "^11.0.4", - "@types/uuid": "^9.0.7", - "npm-check-updates": "^16.14.12" + "@types/uuid": "^9.0.8", + "npm-check-updates": "^16.14.14" } }, "node_modules/@colors/colors": { @@ -948,9 +948,9 @@ } }, "node_modules/@types/uuid": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.7.tgz", - "integrity": "sha512-WUtIVRUZ9i5dYXefDEAI7sh9/O7jGvHg7Df/5O/gtH3Yabe5odI3UWopVR1qbPXQtvOxWu3mM4XxlYeZtMWF4g==", + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", "dev": true }, "node_modules/abbrev": { @@ -1090,9 +1090,9 @@ } }, "node_modules/axios": { - "version": "1.6.6", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.6.tgz", - "integrity": "sha512-XZLZDFfXKM9U/Y/B4nNynfCRUqNyVZ4sBC/n9GDRCkq9vd2mIvKjKKsbIh1WPmHmNbg6ND7cTBY3Y2+u1G3/2Q==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", + "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", "dependencies": { "follow-redirects": "^1.15.4", "form-data": "^4.0.0", @@ -3315,9 +3315,9 @@ } }, "node_modules/npm-check-updates": { - "version": "16.14.12", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-16.14.12.tgz", - "integrity": "sha512-5FvqaDX8AqWWTDQFbBllgLwoRXTvzlqVIRSKl9Kg8bYZTfNwMnrp1Zlmb5e/ocf11UjPTc+ShBFjYQ7kg6FL0w==", + "version": "16.14.14", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-16.14.14.tgz", + "integrity": "sha512-Y3ajS/Ep40jM489rLBdz9jehn/BMil5s9fA4PSr2ZJxxSmtLWCSmRqsI2IEZ9Nb3MTMu8a3s7kBs0l+JbjdkTA==", "dev": true, "dependencies": { "chalk": "^5.3.0", diff --git a/package.json b/package.json index 1934706..9648a4b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@smartbear/visualtest-cypress", - "version": "1.9.1", + "version": "1.9.2", "description": "Cypress Plugin for SmartBear VisualTest via JavaScript", "author": "Trevor Nelms", "main": "index.js", @@ -12,7 +12,7 @@ "publish-npm-public": "scripts/publish-NPM-public.sh" }, "dependencies": { - "axios": "^1.6.6", + "axios": "^1.6.7", "chalk": "^4.1.2", "dotenv": "^16.4.1", "fs-extra": "^11.2.0", @@ -35,7 +35,7 @@ ], "devDependencies": { "@types/fs-extra": "^11.0.4", - "@types/uuid": "^9.0.7", - "npm-check-updates": "^16.14.12" + "@types/uuid": "^9.0.8", + "npm-check-updates": "^16.14.14" } } diff --git a/plugin.js b/plugin.js index a2f1f20..0406bb6 100644 --- a/plugin.js +++ b/plugin.js @@ -461,8 +461,8 @@ function makeGlobalRunHooks() { throw new Error(`Error with lowering image resolution: ${error}`); } }, - async copy({path, imageName, imageType}) { - if (configFile.debug) await fs.copy(path, `${debugFolderPath}/${imageName}-${imageType}/${imageName}.png`); //copy the final image to debug folder + async copy({path, imageName, imageType, reduced = false}) { + if (configFile.debug) await fs.copy(path, `${debugFolderPath}/${imageName}-${imageType}/${reduced ? `${imageName}-reduced` : imageName}.png`); //copy the final image to debug folder return null; }, async deleteImage({path}) { diff --git a/test/package-lock.json b/test/package-lock.json index 5ac18f7..f38c08d 100644 --- a/test/package-lock.json +++ b/test/package-lock.json @@ -10,19 +10,19 @@ "license": "ISC", "dependencies": { "@smartbear/visualtest-cypress": "file:..", - "cypress": "^13.6.3", + "cypress": "^13.6.4", "mochawesome": "^7.1.3", "mochawesome-merge": "^4.3.0" } }, "..": { "name": "@smartbear/visualtest-cypress", - "version": "1.9.1", + "version": "1.9.2", "license": "ISC", "dependencies": { - "axios": "^1.6.5", + "axios": "^1.6.7", "chalk": "^4.1.2", - "dotenv": "^16.3.2", + "dotenv": "^16.4.1", "fs-extra": "^11.2.0", "pino": "^8.17.2", "pino-pretty": "^10.3.1", @@ -35,8 +35,8 @@ }, "devDependencies": { "@types/fs-extra": "^11.0.4", - "@types/uuid": "^9.0.7", - "npm-check-updates": "^16.14.12" + "@types/uuid": "^9.0.8", + "npm-check-updates": "^16.14.14" } }, "node_modules/@colors/colors": { @@ -627,9 +627,9 @@ } }, "node_modules/cypress": { - "version": "13.6.3", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.6.3.tgz", - "integrity": "sha512-d/pZvgwjAyZsoyJ3FOsJT5lDsqnxQ/clMqnNc++rkHjbkkiF2h9s0JsZSyyH4QXhVFW3zPFg82jD25roFLOdZA==", + "version": "13.6.4", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.6.4.tgz", + "integrity": "sha512-pYJjCfDYB+hoOoZuhysbbYhEmNW7DEDsqn+ToCLwuVowxUXppIWRr7qk4TVRIU471ksfzyZcH+mkoF0CQUKnpw==", "hasInstallScript": true, "dependencies": { "@cypress/request": "^3.0.0", diff --git a/test/package.json b/test/package.json index 1c80b90..ce44443 100644 --- a/test/package.json +++ b/test/package.json @@ -12,7 +12,7 @@ "license": "ISC", "dependencies": { "@smartbear/visualtest-cypress": "file:..", - "cypress": "^13.6.3", + "cypress": "^13.6.4", "mochawesome": "^7.1.3", "mochawesome-merge": "^4.3.0" }