-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add ability to specify ignoreDiffPixelCount in assertView #849
Conversation
b690cfd
to
d747364
Compare
@@ -25,5 +34,16 @@ exports.handleImageDiff = (currImg, refImg, state, opts) => { | |||
...buildDiffOpts, | |||
}; | |||
|
|||
return Promise.reject(ImageDiffError.create(state, currImg, refImg, diffOpts, diffAreas, diffBuffer)); | |||
return Promise.reject( | |||
ImageDiffError.create({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed this method's params to be a single object. This would be passed into html-reporter
src/browser/commands/types.ts
Outdated
* | ||
* @defaultValue `0` | ||
*/ | ||
maxDiffPixels?: `${number}%` | number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
в остальном ок
src/browser/commands/types.ts
Outdated
* @example '1.5%' | ||
* | ||
* @remarks | ||
* Usefull, when you have 2-5 different pixels you can't get rid of using `tolerance` and `antialiasingTolerance`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
меня здесь смущает связка "get rid of using tolerance
". Выше писал как можно перефразировать
4602301
to
31372d9
Compare
7cf5930
to
7a7230d
Compare
7a7230d
to
32242e1
Compare
What is done
Implemented
ignoreDiffPixelCount
optional param toassertView
command.With there params, it would be possible to ignore 2-5 pixel image diffs, which are hard to get rid of
Example: