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

Use errorThreshold from global options #75

Closed
nelson-amorim opened this issue Apr 1, 2021 · 3 comments
Closed

Use errorThreshold from global options #75

nelson-amorim opened this issue Apr 1, 2021 · 3 comments

Comments

@nelson-amorim
Copy link
Contributor

Hi! First of all, thank for this module. It is really helpful =)

So, I have seen that here it was added errorThreshold in global options.
But as far as I tested and debugged the code, it is only took in consideration if we pass an object as second argument.
I will try to explain better with code:

compareSnapshotCommand({
  capture: "fullPage",
  errorThreshold: 0.04,
});

cy.compareSnapshot("home", 0.03); // use 0.03 as errorThreshold -> ok
cy.compareSnapshot("home"); // won't use global options errorThreshold. Instead will use 0 -> is this intentional?
cy.compareSnapshot("home", {}); // will use the global options errorThreshold

If this is not intentional, I think there is an easy way to solve that.
Let me know if I can open a PR related to this possible issue.

And, again, thanks for the module =)

@mjhea0
Copy link
Collaborator

mjhea0 commented Apr 26, 2021

Yes, this is not intentional. Feel free to open a PR. Thanks!

@amannn
Copy link

amannn commented Oct 28, 2021

This was fixed in #80 – right? Should this issue be closed?

@mjhea0
Copy link
Collaborator

mjhea0 commented Oct 28, 2021

Yes, @amannn. Thanks! :)

@mjhea0 mjhea0 closed this as completed Oct 28, 2021
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

3 participants