From e2d737ff2b33443bfa2cda56d18b715c4430ade2 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Thu, 11 Apr 2024 19:31:39 +0200 Subject: [PATCH 1/2] Don't save in test_integer_input Reproduces https://github.com/galaxyproject/galaxy/issues/17970 --- lib/galaxy/selenium/navigates_galaxy.py | 13 +++++++------ lib/galaxy_test/selenium/test_workflow_editor.py | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/galaxy/selenium/navigates_galaxy.py b/lib/galaxy/selenium/navigates_galaxy.py index f156f348703d..ac13d0fbe605 100644 --- a/lib/galaxy/selenium/navigates_galaxy.py +++ b/lib/galaxy/selenium/navigates_galaxy.py @@ -1510,7 +1510,7 @@ def workflow_run_ensure_expanded(self): workflow_run.expand_form_link.wait_for_and_click() workflow_run.expanded_form.wait_for_visible() - def workflow_create_new(self, annotation=None, clear_placeholder=False): + def workflow_create_new(self, annotation=None, clear_placeholder=False, save_workflow=True): self.workflow_index_open() self.sleep_for(self.wait_types.UX_RENDER) self.click_button_new_workflow() @@ -1522,11 +1522,12 @@ def workflow_create_new(self, annotation=None, clear_placeholder=False): name_component.wait_for_and_send_keys(name) annotation = annotation or self._get_random_name() self.components.workflow_editor.edit_annotation.wait_for_and_send_keys(annotation) - save_button = self.components.workflow_editor.save_button - save_button.wait_for_visible() - assert not save_button.has_class("disabled") - save_button.wait_for_and_click() - self.sleep_for(self.wait_types.UX_RENDER) + if save_workflow: + save_button = self.components.workflow_editor.save_button + save_button.wait_for_visible() + assert not save_button.has_class("disabled") + save_button.wait_for_and_click() + self.sleep_for(self.wait_types.UX_RENDER) return name def invocation_index_table_elements(self): diff --git a/lib/galaxy_test/selenium/test_workflow_editor.py b/lib/galaxy_test/selenium/test_workflow_editor.py index a98e5f3b756b..39471e887267 100644 --- a/lib/galaxy_test/selenium/test_workflow_editor.py +++ b/lib/galaxy_test/selenium/test_workflow_editor.py @@ -224,7 +224,7 @@ def test_data_column_input_editing(self): def test_integer_input(self): editor = self.components.workflow_editor - name = self.workflow_create_new() + name = self.workflow_create_new(save_workflow=False) self.workflow_editor_add_input(item_name="parameter_input") self.screenshot("workflow_editor_parameter_input_new") editor.label_input.wait_for_and_send_keys("input1") From 0ec987faa111b52305933608141b7929190cd228 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Thu, 11 Apr 2024 19:17:35 +0200 Subject: [PATCH 2/2] Set from_tool_form: true when saving new workflow Fixes https://github.com/galaxyproject/galaxy/issues/17963 and https://github.com/galaxyproject/galaxy/issues/17970 --- client/src/components/Workflow/services.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/Workflow/services.js b/client/src/components/Workflow/services.js index d354fda81826..ab0f1f4acaf2 100644 --- a/client/src/components/Workflow/services.js +++ b/client/src/components/Workflow/services.js @@ -32,7 +32,7 @@ export class Services { async createWorkflow(workflow) { const url = withPrefix("/api/workflows"); try { - const { data } = await axios.post(url, { workflow: toSimple(workflow.id, workflow) }); + const { data } = await axios.post(url, { workflow: toSimple(workflow.id, workflow), from_tool_form: true }); return data; } catch (e) { rethrowSimple(e);