diff --git a/client/src/components/Tool/ToolCard.vue b/client/src/components/Tool/ToolCard.vue
index f09527328008..21e12c9cfce3 100644
--- a/client/src/components/Tool/ToolCard.vue
+++ b/client/src/components/Tool/ToolCard.vue
@@ -127,7 +127,9 @@ const showHelpForum = computed(() => isConfigLoaded.value && config.value.enable
{{ props.title }}
{{ props.description }}
- (Galaxy Version {{ props.version }})
+ (Galaxy Version {{ props.version }})
diff --git a/client/src/utils/navigation/navigation.yml b/client/src/utils/navigation/navigation.yml
index 188bbe512c3a..6ba74371bc8f 100644
--- a/client/src/utils/navigation/navigation.yml
+++ b/client/src/utils/navigation/navigation.yml
@@ -565,6 +565,7 @@ registration:
tool_form:
selectors:
+ tool_version: '[data-description="galaxy tool version"]'
options: '.tool-dropdown'
execute: 'button#execute'
parameter_div: 'div.ui-form-element[id="form-element-${parameter}"]'
@@ -743,6 +744,7 @@ workflow_editor:
delete_selection: "[title='delete selected']"
auto_layout: "#auto-layout-button"
changes: "#activity-workflow-undo-redo"
+ upgrade_all: "#activity-workflow-upgrade"
comment:
selectors:
_: ".workflow-editor-comment"
diff --git a/lib/galaxy/selenium/navigates_galaxy.py b/lib/galaxy/selenium/navigates_galaxy.py
index 04a9372723e6..8d88faca8908 100644
--- a/lib/galaxy/selenium/navigates_galaxy.py
+++ b/lib/galaxy/selenium/navigates_galaxy.py
@@ -64,6 +64,7 @@
GALAXY_VISUALIZATION_FRAME_ID = "galaxy_visualization"
WaitType = collections.namedtuple("WaitType", ["name", "default_length"])
+EditorNodeReference = Union[int, str] # can reference nodes by order_index (starting at 0 as int or label)
class HistoryEntry(NamedTuple):
@@ -1211,6 +1212,31 @@ def workflow_editor_set_license(self, license: str) -> None:
license_selector_option = self.components.workflow_editor.license_selector_option
license_selector_option.wait_for_and_click()
+ def workflow_editor_add_tool_step(self, tool_id: str):
+ self.tool_open(tool_id)
+
+ def workflow_editor_set_label(self, label: str, node: Optional[EditorNodeReference] = None):
+ editor = self.components.workflow_editor
+ self.workflow_editor_ensure_tool_form_open(node)
+ self.set_text_element(editor.label_input, label)
+
+ def workflow_editor_set_tool_vesrion(self, version: str, node: Optional[EditorNodeReference] = None) -> None:
+ editor = self.components.workflow_editor
+ self.workflow_editor_ensure_tool_form_open(node)
+ editor.tool_version_button.wait_for_and_click()
+ assert self.select_dropdown_item(f"Switch to {version}"), "Switch to tool version dropdown item not found"
+
+ def workflow_editor_ensure_tool_form_open(self, node: Optional[EditorNodeReference] = None):
+ # if node is_empty just assume current tool step is open
+ editor = self.components.workflow_editor
+ if node is not None:
+ if isinstance(node, int):
+ node = editor.node.by_id(id=node)
+ else:
+ node = editor.node._(label=node)
+ node.wait_for_and_click()
+ editor.node_inspector.wait_for_visible()
+
def workflow_editor_click_option(self, option_label):
self.workflow_editor_click_options()
menu_element = self.workflow_editor_options_menu_element()
diff --git a/lib/galaxy_test/selenium/test_workflow_editor.py b/lib/galaxy_test/selenium/test_workflow_editor.py
index ba86853fa026..3997fa7c7889 100644
--- a/lib/galaxy_test/selenium/test_workflow_editor.py
+++ b/lib/galaxy_test/selenium/test_workflow_editor.py
@@ -530,9 +530,7 @@ def test_editor_tool_upgrade(self):
self.workflow_index_open()
self.components.workflows.edit_button.wait_for_and_click()
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.workflow_editor_set_tool_vesrion("multiple_versions", "0.2")
self.screenshot("workflow_editor_version_update")
self.sleep_for(self.wait_types.UX_RENDER)
self.assert_workflow_has_changes_and_save()
@@ -547,6 +545,22 @@ def test_editor_tool_upgrade(self):
workflow = self.workflow_populator.download_workflow(workflow_id)
assert workflow["steps"]["0"]["tool_version"] == "0.1+galaxy6"
+ @selenium_test
+ def test_editor_tool_upgrade_all_tools(self):
+ editor = self.components.workflow_editor
+ annotation = "upgarde_all_test"
+ name = self.workflow_create_new(annotation=annotation)
+ self.workflow_editor_add_tool_step("multiple_versions")
+ self.workflow_editor_set_label(label="target label")
+ self.workflow_editor_set_tool_vesrion("0.1")
+ self.assert_workflow_has_changes_and_save()
+
+ editor.tool_bar.upgrade_all.wait_for_and_click()
+ self.workflow_editor_ensure_tool_form_open(node=0)
+ node = self.components.tool_form.tool_version.wait_for_present()
+ version = node.get_attribute("data-version")
+ assert version == "0.2"
+
@selenium_test
def test_editor_tool_upgrade_message(self):
workflow_populator = self.workflow_populator
@@ -719,9 +733,7 @@ def test_editor_duplicate_node(self):
self.workflow_index_open()
self.components.workflows.edit_button.wait_for_and_click()
editor = self.components.workflow_editor
- cat_node = editor.node._(label="first_cat")
- cat_node.wait_for_and_click()
- self.set_text_element(editor.label_input, "source label")
+ self.workflow_editor_set_label(label="source label", node="first_cat")
# Select node using new label, ensures labels are synced between side panel and node
cat_node = editor.node._(label="source label")
self.assert_workflow_has_changes_and_save()
@@ -1270,7 +1282,7 @@ def test_editor_selection(self):
canvas = editor.canvas_body.wait_for_visible()
# place tool in center of canvas
- self.tool_open("cat")
+ self.workflow_editor_add_tool_step("cat")
self.sleep_for(self.wait_types.UX_RENDER)
editor.label_input.wait_for_and_send_keys("tool_node")
tool_node = editor.node._(label="tool_node").wait_for_present()