Skip to content

Commit

Permalink
Adds auto-layout button ID in workflow toolbar
Browse files Browse the repository at this point in the history
Introduces an ID for the auto-layout button in the toolbar component.
Updates navigation configuration and Selenium tests to use the new button ID for auto-layout functionality.
  • Loading branch information
itisAliRH committed Nov 17, 2024
1 parent 7e4ca5c commit 38756ab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions client/src/components/Workflow/Editor/Tools/ToolBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ function autoLayout() {
</BButton>

<BButton
id="auto-layout-button"
v-b-tooltip.hover.noninteractive.right
title="Auto Layout (Ctrl + 9)"
data-tool="auto_layout"
Expand Down
1 change: 1 addition & 0 deletions client/src/utils/navigation/navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,7 @@ workflow_editor:
clear_selection: "[title='clear selection']"
duplicate_selection: "[title='duplicate selected']"
delete_selection: "[title='delete selected']"
auto_layout: "#auto-layout-button"
comment:
selectors:
_: ".workflow-editor-comment"
Expand Down
10 changes: 5 additions & 5 deletions lib/galaxy_test/selenium/test_workflow_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,9 @@ def test_editor_create_conditional_step(self):
editor.label_input.wait_for_and_send_keys("downstream_step")
# Insert head tool
self.tool_open("head")
self.workflow_editor_click_option("Auto Layout")

self.components.workflow_editor.tool_bar.auto_layout.wait_for_and_click()

self.sleep_for(self.wait_types.UX_RENDER)
editor.label_input.wait_for_and_send_keys("conditional_step")
# Connect head to cat
Expand Down Expand Up @@ -846,7 +848,7 @@ def test_conditional_subworkflow_step(self):
param_type_element = editor.param_type_form.wait_for_present()
self.switch_param_type(param_type_element, "Boolean")
editor.label_input.wait_for_and_send_keys("param_input")
self.workflow_editor_click_option("Auto Layout")
self.components.workflow_editor.tool_bar.auto_layout.wait_for_and_click()
self.sleep_for(self.wait_types.UX_RENDER)
conditional_node = editor.node._(label=child_workflow_name)
conditional_node.wait_for_and_click()
Expand Down Expand Up @@ -1220,8 +1222,6 @@ def test_editor_snapping(self):
self.workflow_create_new(annotation="simple workflow")
self.sleep_for(self.wait_types.UX_RENDER)

editor.tool_menu.wait_for_visible()

self.tool_open("cat")
self.sleep_for(self.wait_types.UX_RENDER)
editor.label_input.wait_for_and_send_keys("tool_node")
Expand Down Expand Up @@ -1418,7 +1418,7 @@ def open_in_workflow_editor(self, yaml_content, auto_layout=True):
self.workflow_index_open()
self.workflow_index_open_with_name(name)
if auto_layout:
self.workflow_editor_click_option("Auto Layout")
self.components.workflow_editor.tool_bar.auto_layout.wait_for_and_click()
self.sleep_for(self.wait_types.UX_RENDER)
return name

Expand Down

0 comments on commit 38756ab

Please sign in to comment.