Skip to content

Commit

Permalink
Selenium - fix rerunning test errors for test_custom_builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Sep 24, 2017
1 parent 4a4d049 commit 6168e24
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions test/selenium_tests/test_custom_builds.py
Expand Up @@ -9,19 +9,19 @@

class CustomBuildsTestcase(SharedStateSeleniumTestCase):

def setUp(self):
super(CustomBuildsTestcase, self).setUp()
self.home() # ensure Galaxy is loaded
self.submit_login(self.user_email, retries=2)

@selenium_test
def test_build_add(self):
self._login()

self.navigate_to_custom_builds_page()

self.add_custom_build(self.build_name1, self.build_key1)
self.assert_custom_builds_in_grid([self.build_name1])

@selenium_test
def test_build_delete(self):
self._login()

self.navigate_to_custom_builds_page()

self.add_custom_build(self.build_name2, self.build_key2)
Expand All @@ -39,6 +39,10 @@ def assert_custom_builds_in_grid(self, expected_builds, present=True):
else:
self.assertEqual(intersection, set())

def _login(self):
self.home() # ensure Galaxy is loaded
self.submit_login(self.user_email, retries=2)

def add_custom_build(self, build_name, build_key):
name_div = self.wait_for_selector('div[tour_id="name"')
name_input = name_div.find_element_by_css_selector('.ui-form-field input')
Expand Down

0 comments on commit 6168e24

Please sign in to comment.