Skip to content

Commit

Permalink
SBVT-2278: bumping minor version and package updates and adding debug…
Browse files Browse the repository at this point in the history
… for reduced image (#230)
  • Loading branch information
tnelms1 committed Jan 31, 2024
1 parent 9ceac19 commit c2ed8c6
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 30 deletions.
2 changes: 2 additions & 0 deletions commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand All @@ -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"
}
}
4 changes: 2 additions & 2 deletions plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}) {
Expand Down
18 changes: 9 additions & 9 deletions test/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit c2ed8c6

Please sign in to comment.