Small library that allows us to compare screenshots generated by puppeteer in our tests.
overrides
attribute to outputSettings
that allows to set sharp's optionsoutputSettings
)puppeteer
to 11.0.0
nodejs-resemble
to 0.4.1
Fix dependency issue with node-resemble.js
Change dependency on node-resemble.js (no longer maintained) to my own fork
Implement include rectangles (see README.md)
Closes #33
Upgrade to puppeteer 5.x More on ignoring rectangles
@JacobJust Added config to overwrite image, useful if target images are commit ... @JacobJust commit target image
New screenshotOptions
option:
saveNewImageOnError
: <[boolean]> saves the undiffed new image on error as ${saveFolder}/${name}-diff${ext}
##Changes -Default threshold set to 0 -Add option to setup how to display errors:
errorSettings
<[Object]> change how to display errors (errorType: flat
| movement
| flatDifferenceIntensity
| movementDifferenceIntensity
| diffOnly
):{
errorColor: {
red: 255,
green: 0,
blue: 255
},
errorType: 'flat',
transparency: 0.7
}
###Major changes
Change in comparison library, replace pixelmatch with node-resemble.js
Default threshold
changed from 0.1
to 0.02
which means that right now images with more than 2% difference are treated as different
Add options in constructor
ignoreColors
<[boolean]> should ignore colors?ignoreRectangles
<[Array<Array[x, y, width, height]>]> should ignore rectangles? example: [[325,170,100,40], [10,10,200,200]]