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

Only report the closest match which didn't fit #39

Open
DaniRey opened this issue Jun 7, 2017 · 0 comments
Open

Only report the closest match which didn't fit #39

DaniRey opened this issue Jun 7, 2017 · 0 comments

Comments

@DaniRey
Copy link
Collaborator

DaniRey commented Jun 7, 2017

In case we have the following HtmlElement

<select>
 <option value="foo">foo</option>
 <option value="bar1">bar</option>
</select>

and the following Gauge definition

elem fits(<option value="bar">bar</option>)

It would currently report
Misfitting Attribute: [value] in [HtmlOption[<option value="foo">]] with value[bar] didn't equal [bar]
Misfitting Attribute: [value] in [HtmlOption[<option value="bar1">]] with value[bar1] didn't equal [bar]

A human would immediately see, that the second element is what we where looking for, because the text is correct, but only the value attribute is off. While with the first candidate, both text and value are off.

If we would try every attribute instead of reporting a misfit, as soon as an attribute of the gauge definition doesn't fit, we could provide better Misfit reports.

In case we find a solution for this, we have to make sure it doesn't hurt performance too much. Maybe one could only execute the deeper analysis of misfits, in case the gauge doesn't fit.

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

1 participant