-
-
Notifications
You must be signed in to change notification settings - Fork 190
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
Remove select and selected?/1 from Browser module. #240
Conversation
|> selected?(Query.option("Option 2")) == true | ||
|> find(select("My Select")) | ||
|> click(option("Option 2")) | ||
|> selected?(option("Option 2")) == true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this test call selected/2
and the one below calls Element.selected/2
? Also would it be good to have a test to ensure this function returns false
when the option is not selected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test below should be calling Element.selected?/1
. I'll add a test to make sure that it returns false. Thats a good catch.
@aaronrenner Added the extra tests. Lemme know what you think. |
Thanks, the tests look good. Is the reason wallaby has |
Partially. In general the |
That makes sense. Thanks for the explanation. |
* Remove select and selected?/1 from Browser module. * Add negative tests for selected?/2 and selected?/1
This PR removes the
select
functions andselected?/1
from the Browser module. It would be very nice to have some sort of query composition for finding options inside of a given select. Because there are multiple "Option 2" options on the page you get a duplicate element error if you don't scope everything to the specific select.