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

Fix bad button type error reporting. #228

Merged
merged 2 commits into from
May 14, 2017

Conversation

keathley
Copy link
Member

@keathley keathley commented May 12, 2017

If there are duplicate buttons then Wallaby will incorrectly return an error saying that the button has a bad type. But the real error is that the specified count is incorrect. This PR adds a test for this case and fixes the underlying bug.

@keathley keathley force-pushed the bugs/bad-error-reporting-for-buttons branch from cbcfeae to b3a3e6e Compare May 12, 2017 02:37
Copy link
Member

@aaronrenner aaronrenner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I like how you when you return the {:error, :button_with_bad_type} tuple, it converts it into a friendly error message in lib/wallaby/query/error_message.ex. Also 🎉 for more tests.

Copy link
Collaborator

@PragTob PragTob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

I guess the merge conflict was me merging the other PR.

Will resolve.

If there are duplicate buttons then Wallaby will incorrectly return an
error saying that the button has a bad type. However, the real error is
that the specified count is incorrect. This commit adds a test for this
case and fixes the underlying bug.
@PragTob PragTob force-pushed the bugs/bad-error-reporting-for-buttons branch from b3a3e6e to 3320fd7 Compare May 13, 2017 12:42
@PragTob
Copy link
Collaborator

PragTob commented May 13, 2017

And another conflict... I don't believe it :|

@PragTob
Copy link
Collaborator

PragTob commented May 14, 2017

And finally this can go in :)

@PragTob PragTob merged commit 8c393f8 into master May 14, 2017
@PragTob PragTob deleted the bugs/bad-error-reporting-for-buttons branch May 14, 2017 08:38
graeme-defty pushed a commit to graeme-defty/wallaby that referenced this pull request May 16, 2017
If there are duplicate buttons then Wallaby will incorrectly return an
error saying that the button has a bad type. However, the real error is
that the specified count is incorrect. This commit adds a test for this
case and fixes the underlying bug.
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

Successfully merging this pull request may close these issues.

None yet

3 participants