Fix Selenium test cases for JavaScript-izing workflow management.

This commit is contained in:
John Chilton
2017-05-11 09:35:14 -04:00
parent 004f843ba4
commit c76c588ed1
2 changed files with 6 additions and 6 deletions
+4 -5
View File
@@ -394,17 +394,16 @@ class NavigatesGalaxy(HasDriver):
self.click_masthead_workflow()
def workflow_index_table_elements(self):
self.wait_for_selector_visible(".manage-table tbody")
table_elements = self.driver.find_elements_by_css_selector(".manage-table tbody > tr")
# drop header
return table_elements[1:]
self.wait_for_selector_visible("tbody.workflow-search")
table_elements = self.driver.find_elements_by_css_selector("tbody.workflow-search > tr")
return table_elements
def workflow_index_click_option(self, option_title, workflow_index=0):
table_elements = self.workflow_index_table_elements()
workflow_row = table_elements[workflow_index]
workflow_button = workflow_row.find_element_by_css_selector(".menubutton")
workflow_button.click()
menu_element = self.wait_for_selector_visible(".popmenu-wrapper .dropdown-menu")
menu_element = self.wait_for_selector_visible("ul.action-dpd")
menu_options = menu_element.find_elements_by_css_selector("li a")
found_option = False
for menu_option in menu_options:
@@ -45,7 +45,8 @@ class WorkflowManagementTestCase(SeleniumTestCase):
assert 'CoolNewName' in renamed_workflow_button.text, renamed_workflow_button.text
def _workflow_import_from_url(self):
self.click_selector(self.test_data["selectors"]["workflows"]["import_button"])
element = self.wait_for_selector_clickable(self.test_data["selectors"]["workflows"]["import_button"])
element.click()
url = "https://raw.githubusercontent.com/galaxyproject/galaxy/dev/test/base/data/test_workflow_1.ga"
form_element = self.driver.find_element_by_css_selector("#center form")
url_element = form_element.find_element_by_css_selector("input[type='text']")