Selenium test for tool version update

This commit is contained in:
mvdbeek
2021-01-30 12:28:01 +01:00
parent 88d7c4bb79
commit 4f56ba2d1d
4 changed files with 31 additions and 6 deletions
+1
View File
@@ -149,6 +149,7 @@ export default FormBase.extend({
// button for version selection
var versions_button = new Ui.ButtonMenu({
icon: "fa-cubes",
cls: "btn btn-secondary float-right tool-versions",
title: options.narrow ? null : "Versions",
tooltip: "Select another tool version",
});
+5 -6
View File
@@ -1028,18 +1028,17 @@ class NavigatesGalaxy(HasDriver):
workflow_button = workflow_row.find_element_by_css_selector(workflow_selector)
workflow_button.click()
def workflow_index_click_option(self, option_title, workflow_index=0):
self.workflow_click_option(".workflow-dropdown", workflow_index)
def select_dropdown_item(self, option_title):
menu_element = self.wait_for_selector_visible(".dropdown-menu.show")
menu_options = menu_element.find_elements_by_css_selector("a.dropdown-item")
found_option = False
for menu_option in menu_options:
if option_title in menu_option.text:
menu_option.click()
found_option = True
break
return True
if not found_option:
def workflow_index_click_option(self, option_title, workflow_index=0):
self.workflow_click_option(".workflow-dropdown", workflow_index)
if not self.select_dropdown_item(option_title):
raise AssertionError("Failed to find workflow action option with title [%s]" % option_title)
def workflow_index_click_tag_display(self, workflow_index=0):
+1
View File
@@ -378,6 +378,7 @@ workflow_editor:
label_input: "[tour_id='__label'] input"
annotation_input: "[tour_id='__annotation'] textarea"
tool_version_button: ".tool-versions"
connector_for: "div[output-handle-id='${source_id}'][input-handle-id='${sink_id}']"
@@ -298,6 +298,30 @@ steps:
self.screenshot("workflow_editor_edit_menu")
self.workflow_editor_click_option("Save As")
@selenium_test
def test_editor_tool_upgrade(self):
workflow_populator = self.workflow_populator
workflow_id = workflow_populator.upload_yaml_workflow("""class: GalaxyWorkflow
inputs: []
steps:
- tool_id: multiple_versions
tool_version: 0.1
label: multiple_versions
state:
foo: bar
""", exact_tools=True)
self.workflow_index_open()
self.workflow_index_click_option("Edit")
editor = self.components.workflow_editor
editor.node._(label="multiple_versions").wait_for_and_click()
editor.tool_version_button.wait_for_and_click()
assert self.select_dropdown_item('Switch to 0.2'), 'Switch to tool version dropdown item not found'
self.screenshot("workflow_editor_version_update")
self.assert_has_changes_and_save()
self.sleep_for(self.wait_types.UX_RENDER)
workflow = self.workflow_populator.download_workflow(workflow_id)
assert workflow['steps']['0']['tool_version'] == '0.2'
@selenium_test
def test_editor_tool_upgrade_message(self):
workflow_populator = self.workflow_populator