Skip to content

Commit

Permalink
After some investigation it seems you can only use ignoreboxes or orI…
Browse files Browse the repository at this point in the history
…gnoreAreasColoredWith (but not together).

Will investigate further, but changed it so that we can still use ignoreboxes.
  • Loading branch information
snevesbarros committed Dec 3, 2023
1 parent d048f35 commit 6d72762
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/controllers/screenshot.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,11 +390,15 @@ exports.compareImageAgainstBaseline = (req, res) => {
const options = {
output: {
returnEarlyThreshold: 50,
ignoredBoxes,
ignoreAreasColoredWith: { r: 255, g: 0, b: 255 },
ignore: 'less',
},
};
// it turns out you can only use one or the other.
if (ignoredBoxes.length > 0) {
options.output.ignoredBoxes = ignoredBoxes;
} else {
options.output.ignoreAreasColoredWith = { r: 255, g: 0, b: 255 };
}
return compare(
screenshot.path,
baseline.screenshot.path,
Expand Down

0 comments on commit 6d72762

Please sign in to comment.