-
Notifications
You must be signed in to change notification settings - Fork 43
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
Return exception
arg for Browser.wait_for_element
#134
Conversation
testing/test_browser.py
Outdated
@@ -78,6 +78,13 @@ def test_wait_for_element_visible_fail_except(browser): | |||
browser.wait_for_element('#invisible_appear_p', visible=True, timeout=1.5) | |||
|
|||
|
|||
def test_wait_for_element_visible_fail_none(browser): |
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.
🎉
testing/test_browser.py
Outdated
# Click on the button | ||
browser.click('#invisible_appear_button') | ||
assert browser.wait_for_element( | ||
'#invisible_appear_p', visible=True, timeout=1.5, exception=False) is None |
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.
Can you please expand/parametrize the test to also pass exception=True in a pytest.raises
block?
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.
nvm, I see its separate test case already.
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.
I can, but isn't this scenario already covered in test_wait_for_element_visible_fail_except
? Or you want to check explicitly?
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.
It is, I'd like to combine them, do you mind if I push a commit to your PR with an updated test? I'm targeting to merge and release this now(ish)
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.
sure thing
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.
Making sure updated tests pass in travis, they did locally in Tox.
Collapse two cases into one parametrized case wait_for_element exception control, true/false behavior validation
Included in 0.32: https://github.com/RedHatQE/widgetastic.core/releases/tag/0.32.0 |
PR returns
exception
arg for Browser.wait_for_element back (which was removed in #131) as airgun relies heavily on it and extending wait_for_element on our end is problematic due to #132