mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Improve robustness of published workflow display test case.
Failed twice in different ways here https://jenkins.galaxyproject.org/job/selenium/484/ - this should address both cases.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user