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

Allow comparison threshold to be configurable per-component #21

Closed
rarkins opened this issue Jul 13, 2016 · 3 comments
Closed

Allow comparison threshold to be configurable per-component #21

rarkins opened this issue Jul 13, 2016 · 3 comments
Milestone

Comments

@rarkins
Copy link

rarkins commented Jul 13, 2016

Currently the threshold parameter is a command-line one, and so applies to the entire compare. For example if I have 50 different components I'm capturing and just one of them has a regular 1% diff (to ignore), then it means I need to allow for a 1%+ difference for the other 49 captures too, which is undesirable.

Ideally this could be configured in a cascading global-page-component manner like is supported for options like wait-for-delay.

@branneman
Copy link
Member

Interesting idea, not sure if it fits together with the ignore selector feature. What is the nature of the difference, and why wouldn't the ignore feature solve your problem?

@lazytesting what do you think of it?

@rarkins
Copy link
Author

rarkins commented Jul 15, 2016

But then by the same logic would imply you never need a threshold function? I don't understand how it can be considered useful globally but not per-component. Nor how it conflicts with the option to hide certain selectors.

I would prefer to set a threshold per/component rather than ignore selectors completely. In some cases we still want to check that something is displaying and in the correct position, even if the content may itself change.

@lazytesting
Copy link
Member

@rarkins you have a point, it makes sense to be able to set this on component level.
Let's make it configurable on the following levels:

  • base config
  • page
  • component

If it's set on multiple levels we use the highest value. This allows you to set a base threshold and use a higher value on a specific page or component.

With this change we should remove the CLI option, as the CLI arguments should be used for environment specific settings only.

@branneman branneman modified the milestones: v0.7.0, v0.6.1 Jul 20, 2016
@rarkins rarkins closed this as not planned Won't fix, can't repro, duplicate, stale Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants