Selenium - attempted fix for transiently failing history options test.

Comments inline about this - but the target failure I'm hoping this fixes is:

https://jenkins.galaxyproject.org/job/selenium/528/artifact/528-test-errors/test_options2017092203081506064101/stacktrace.txt
This commit is contained in:
John Chilton
2017-09-22 08:57:18 -04:00
parent 3ffdfc67e7
commit 77b61ba82d
2 changed files with 13 additions and 1 deletions
+12
View File
@@ -819,6 +819,18 @@ class NavigatesGalaxy(HasDriver):
self.click_center()
return text
@retry_during_transitions
def assert_selector_absent_or_hidden_after_transitions(self, selector):
"""Variant of assert_selector_absent_or_hidden that retries during transitions.
In the parent method - the element is found and then it is checked to see
if it is visible. It may disappear from the page in the middle there
and cause a StaleElement error. For checks where we care about the final
resting state after transitions - this method can be used to retry
during those transitions.
"""
return self.assert_selector_absent_or_hidden(selector)
def assert_tooltip_text(self, element, expected, sleep=0, click_away=True):
text = self.get_tooltip_text(element, sleep=sleep, click_away=click_away)
assert text == expected, "Tooltip text [%s] was not expected text [%s]." % (text, expected)
+1 -1
View File
@@ -27,4 +27,4 @@ class HistoryOptionsTestCase(SeleniumTestCase):
self.click_hda_title(hda_id, wait=True)
self.assert_selector_absent_or_hidden(hda_body_selector)
self.assert_selector_absent_or_hidden_after_transitions(hda_body_selector)