Releases: NiGhTTraX/mugshot
Releases · NiGhTTraX/mugshot
PixelDiffer options
New features
PixelDiffer
is now a class and can accept a config object through the constructor.- The following options can now be configured for
PixelDiffer
:threshold
: specifies the maximum difference between 2 pixels,diffColor
: sets the color used to mark differing pixels.
Rename baseline -> expected and new -> actual
Breaking changes
MugshotDiffResult
baseline
andbaselinePath
have been renamed toexpected
andexpectedPath
- file names
${name}.new.png
is now${name}.actual.png
[email protected]
New features
- Ignoring elements - you can now pass an
{ ignore: '.selector' }
option to thecheck
method and the first element matched by that selector will be painted black. A future release will see more options like ignoring all elements matched by the selectors, multiple selectors, ignoring areas and custom colors.
Rewrite in modern TypeScript
Breaking changes
- The API is exclusively Promise based.
- The Browser interface (Mugshot's first constructor param) has been changed.
- rootDirectory has been made mandatory and moved to the 2nd argument in the constructor.
- acceptFirstBaseline renamed to createBaselines.
- test renamed to check.
- result.isEqual renamed to result.matches.
- result.screenshot renamed to actual.
Changes
- Everything is written in TS with classes and interfaces.
- Monorepo!
- looks-same has been replaced with pixelmatch.
- png-crop has been replaced with jimp.
- fs has been replaced with fs-extra.
- Full coverage.
v0.3.0
- upgrade to webdriverIO 4
- add linting rules
- enforce unique selectors