From 35c18ff7b0ed2a4e36b91ea7ae489fb3cc0e63fa Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Mon, 20 Nov 2023 13:11:34 +0100 Subject: [PATCH] Add test case --- client/src/utils/navigation/navigation.yml | 4 +++ lib/galaxy_test/selenium/test_workflow_run.py | 31 +++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/client/src/utils/navigation/navigation.yml b/client/src/utils/navigation/navigation.yml index 31427fafb09..7082b7ef11b 100644 --- a/client/src/utils/navigation/navigation.yml +++ b/client/src/utils/navigation/navigation.yml @@ -650,12 +650,16 @@ workflow_run: # TODO: put step labels in the DOM ideally subworkflow_step_icon: ".portlet-title-icon.fa-sitemap" run_workflow: "#run-workflow" + run_workflow_disabled: "#run-workflow.disabled" validation_error: ".validation-error" expand_form_link: '.workflow-expand-form-link' expanded_form: '.workflow-expanded-form' new_history_target_link: '.workflow-new-history-target-link' runtime_setting_button: '.workflow-run-settings' runtime_setting_target: '.workflow-run-settings-target' + simplified_input: + type: xpath + selector: //div[@data-label="${label}"]//input input_select_field: type: xpath selector: '//div[@data-label="${label}"]//div[contains(@class, "multiselect")]' diff --git a/lib/galaxy_test/selenium/test_workflow_run.py b/lib/galaxy_test/selenium/test_workflow_run.py index 1cc55e50324..afb6085b98b 100644 --- a/lib/galaxy_test/selenium/test_workflow_run.py +++ b/lib/galaxy_test/selenium/test_workflow_run.py @@ -277,6 +277,37 @@ steps: ) self.workflow_populator.wait_for_history_workflows(history_id, expected_invocation_count=1) + @selenium_test + @managed_history + def test_workflow_run_button_disabled_when_required_input_missing(self): + self.workflow_run_open_workflow( + """ +class: GalaxyWorkflow +inputs: + text_param: + type: text + optional: false + data_param: + type: data + collection_param: + type: data_collection +steps: {} +""" + ) + workflow_run = self.components.workflow_run + # None of the required parameters are present + workflow_run.run_workflow_disabled.wait_for_present() + # upload datasets and collections + history_id = self.current_history_id() + self.dataset_populator.new_dataset(history_id, wait=True) + self.dataset_collection_populator.create_list_in_history(history_id, wait=True) + input_element = workflow_run.simplified_input(label="text_param").wait_for_and_click() + input_element.send_keys("3") + # Everything is set, workflow is runnable, disabled class should be removed + workflow_run.run_workflow_disabled.wait_for_absent() + input_element.clear() + workflow_run.run_workflow_disabled.wait_for_present() + def _assert_has_3_lines_after_run(self, hid): self.workflow_run_wait_for_ok(hid=hid) history_id = self.current_history_id()