diff --git a/test/galaxy_selenium/navigates_galaxy.py b/test/galaxy_selenium/navigates_galaxy.py index 53a3a1f1938..0843c637d52 100644 --- a/test/galaxy_selenium/navigates_galaxy.py +++ b/test/galaxy_selenium/navigates_galaxy.py @@ -462,6 +462,12 @@ class NavigatesGalaxy(HasDriver): def workflow_index_table_row(self, workflow_index=0): return self.workflow_index_table_elements()[workflow_index] + @retry_during_transitions + def workflow_index_column_text(self, column_index, workflow_index=0): + row_element = self.workflow_index_table_row() + columns = row_element.find_elements_by_css_selector("td") + return columns[column_index].text + def workflow_index_click_search(self): return self.wait_for_and_click_selector("input.search-wf") @@ -475,9 +481,15 @@ class NavigatesGalaxy(HasDriver): alert.accept() def workflow_index_click_option(self, option_title, workflow_index=0): - workflow_row = self.workflow_index_table_row(workflow_index=workflow_index) - workflow_button = workflow_row.find_element_by_css_selector(".menubutton") - workflow_button.click() + + @retry_during_transitions + def click_option(): + workflow_row = self.workflow_index_table_row(workflow_index=workflow_index) + workflow_button = workflow_row.find_element_by_css_selector(".menubutton") + workflow_button.click() + + click_option() + menu_element = self.wait_for_selector_visible("ul.action-dpd") menu_options = menu_element.find_elements_by_css_selector("li a") found_option = False diff --git a/test/selenium_tests/test_workflow_management.py b/test/selenium_tests/test_workflow_management.py index de2367def23..776c4ed9ee7 100644 --- a/test/selenium_tests/test_workflow_management.py +++ b/test/selenium_tests/test_workflow_management.py @@ -95,17 +95,19 @@ class WorkflowManagementTestCase(SeleniumTestCase): self._workflow_import_from_url() self.workflow_index_rename("managementesttopublish") - row_element = self.workflow_index_table_row() - columns = row_element.find_elements_by_css_selector("td") - assert columns[4].text == "No" + published_column_index = 4 + @retry_assertion_during_transitions + def assert_published_column_text_is(expected_text): + column_text = self.workflow_index_column_text(published_column_index) + self.assertEqual(expected_text, column_text) + + assert_published_column_text_is("No") self.workflow_index_click_option("Share") self.workflow_sharing_click_publish() self.workflow_index_open() - row_element = self.workflow_index_table_row() - columns = row_element.find_elements_by_css_selector("td") - assert columns[4].text == "Yes" + assert_published_column_text_is("Yes") @retry_assertion_during_transitions def _assert_showing_n_workflows(self, n):