Skip to content
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

Difference in color is not considered in image snapshot #97

Closed
cpandit201 opened this issue Aug 27, 2019 · 2 comments
Closed

Difference in color is not considered in image snapshot #97

cpandit201 opened this issue Aug 27, 2019 · 2 comments

Comments

@cpandit201
Copy link

cpandit201 commented Aug 27, 2019

Problem: Colors should be considered as a part of the snapshot image difference

Issue: A difference in color is not considered as a failing point for Cypress Image Snapshot
PFB Pictures

PFB the images
Expected: Image diff should FAIL as the expected colors are different
Actual: Image difference is PASSED.

Please let me know how do I enable inclusion of Color in image diff?

image

image

I have overridden below Image Diff configuration let me know if this is the issue:

//<cypress-root>/support/commands.js

import { addMatchImageSnapshotCommand } from 'cypress-image-snapshot/command';

addMatchImageSnapshotCommand({
  failureThreshold: 0.9, // threshold for entire image
  failureThresholdType: 'percent', // percent of image or number of pixels
});
@sebinsua
Copy link

sebinsua commented Sep 9, 2019

Relatively sure that this is a failureThreshold of 90%!

@cpandit201
Copy link
Author

@sebinsua Thanks for clarification 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants