Commit cc0d2279 by Greg Price

Improve robustness of bok choy discussion tests

A test failed because an element disappeared between the evaluation of
the clauses of a conjunction, so rewrite to make the conjunction
unnecessary.
parent 5e4c25dd
...@@ -67,10 +67,7 @@ class DiscussionSingleThreadPage(CoursePage): ...@@ -67,10 +67,7 @@ class DiscussionSingleThreadPage(CoursePage):
)) ))
def _is_element_visible(self, selector): def _is_element_visible(self, selector):
return ( return any(self.css_map(selector, lambda el: el.visible))
self.is_css_present(selector) and
self.css_map(selector, lambda el: el.visible)[0]
)
def is_response_editor_visible(self, response_id): def is_response_editor_visible(self, response_id):
"""Returns true if the response editor is present, false otherwise""" """Returns true if the response editor is present, false otherwise"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment