Skip to content

Commit

Permalink
Selenium - fix transient error in history switching test.
Browse files Browse the repository at this point in the history
History sometimes takes longer than that second to switch in the GUI, so start a retry cycle on that assertion after a half a second.

xref https://jenkins.galaxyproject.org/job/selenium/586/artifact/586-test-errors/test_history_switch2017092413201506273602/stacktrace.txt
  • Loading branch information
jmchilton committed Sep 24, 2017
1 parent 6168e24 commit c90a84e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test/selenium_tests/test_saved_histories.py
Expand Up @@ -20,9 +20,14 @@ def test_history_switch(self):
self._login()
self.navigate_to_saved_histories_page()
self.click_popup_option(self.history2_name, 'Switch')
time.sleep(1)
history_name = self.history_panel_name_element()
self.assertEqual(history_name.text, self.history2_name)
time.sleep(.5)

@retry_assertion_during_transitions
def assert_history_name_switched():
history_name = self.history_panel_name_element()
self.assertEqual(history_name.text, self.history2_name)

assert_history_name_switched()

@selenium_test
def test_history_view(self):
Expand Down

0 comments on commit c90a84e

Please sign in to comment.