-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix: None
in "wait" Methods Causing Incorrectly Passing Tests
#2823
Conversation
Tests are failing due to bad test that is fixed in #2816. Once that PR is merged and this merged into this PR, the tests will all pass. |
with pytest.raises(TimeoutException) as err: | ||
dash_duo.wait_for_contains_text("#content", "None", timeout=1.0) | ||
|
||
assert ( |
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.
👍
with pytest.raises(TimeoutException) as err: | ||
dash_duo.wait_for_contains_text("#value-item", "None", timeout=1.0) | ||
|
||
assert ( |
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 like this solution. Need to think through possible consequences though as this is technically a breaking change in Dash Testing. |
Co-authored-by: Emily KL <4672118+emilykl@users.noreply.github.com>
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.
💃
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.
Looks good to me @TillerBurr -- thanks for the contribution! ✨
There's some failing tests I want to investigate but I'm pretty sure they're not related to your changes.
Closes #2818. This is my take on solving the issue. This method ignores the value prop if it is
None
. I think there is merit to adding await_for_value_to_equal
, but this solves the immediate problem, while causing as little friction as possible.As mentioned in #2818, there are also potential issues in the other methods in the
dash.testing.wait
namespace. Not sure if those cases need to be handled here.Contributor Checklist
None
isn't cast to a string.optionals
CHANGELOG.md