From 2cedaf9f4f4fa8d06be9edfd03bd72b0f7a1ff75 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Mon, 14 Jun 2021 20:00:06 +0200 Subject: [PATCH] Add selenium test for running workflow with optional select dataset --- lib/galaxy_test/base/workflow_fixtures.py | 10 ++++++++++ lib/galaxy_test/selenium/test_workflow_editor.py | 10 ++-------- lib/galaxy_test/selenium/test_workflow_run.py | 9 +++++++++ 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/lib/galaxy_test/base/workflow_fixtures.py b/lib/galaxy_test/base/workflow_fixtures.py index 704d51f258c..04cd8011148 100644 --- a/lib/galaxy_test/base/workflow_fixtures.py +++ b/lib/galaxy_test/base/workflow_fixtures.py @@ -57,6 +57,16 @@ steps: """ +WORKFLOW_SELECT_FROM_OPTIONAL_DATASET = """ +class: GalaxyWorkflow +steps: + select_from_dataset_optional: + tool_id: select_from_dataset_optional + state: + select_single: null +""" + + # Throwing a bunch of broken steps in to get a really long modal and sure it # is scrollable. WORKFLOW_WITH_INVALID_STATE = """ diff --git a/lib/galaxy_test/selenium/test_workflow_editor.py b/lib/galaxy_test/selenium/test_workflow_editor.py index 05acb136fca..b1c4cbb01dd 100644 --- a/lib/galaxy_test/selenium/test_workflow_editor.py +++ b/lib/galaxy_test/selenium/test_workflow_editor.py @@ -6,6 +6,7 @@ from selenium.webdriver.common.keys import Keys from galaxy_test.base.workflow_fixtures import ( WORKFLOW_NESTED_SIMPLE, WORKFLOW_OPTIONAL_TRUE_INPUT_COLLECTION, + WORKFLOW_SELECT_FROM_OPTIONAL_DATASET, WORKFLOW_SIMPLE_CAT_TWICE, WORKFLOW_SIMPLE_MAPPING, WORKFLOW_WITH_INVALID_STATE, @@ -92,14 +93,7 @@ class WorkflowEditorTestCase(SeleniumTestCase): @selenium_test def test_optional_select_data_field(self): editor = self.components.workflow_editor - workflow_id = self.workflow_populator.upload_yaml_workflow(""" -class: GalaxyWorkflow -steps: - select_from_dataset_optional: - tool_id: select_from_dataset_optional - state: - select_single: null - """) + workflow_id = self.workflow_populator.upload_yaml_workflow(WORKFLOW_SELECT_FROM_OPTIONAL_DATASET) self.workflow_index_open() self.workflow_index_click_option("Edit") editor = self.components.workflow_editor diff --git a/lib/galaxy_test/selenium/test_workflow_run.py b/lib/galaxy_test/selenium/test_workflow_run.py index cb4b22d8cec..57417553233 100644 --- a/lib/galaxy_test/selenium/test_workflow_run.py +++ b/lib/galaxy_test/selenium/test_workflow_run.py @@ -8,6 +8,7 @@ from galaxy_test.base.workflow_fixtures import ( WORKFLOW_NESTED_SIMPLE, WORKFLOW_RENAME_ON_REPLACEMENT_PARAM, WORKFLOW_RUNTIME_PARAMETER_SIMPLE, + WORKFLOW_SELECT_FROM_OPTIONAL_DATASET, WORKFLOW_SIMPLE_CAT_TWICE, WORKFLOW_WITH_CUSTOM_REPORT_1, WORKFLOW_WITH_CUSTOM_REPORT_1_TEST_DATA, @@ -199,6 +200,14 @@ steps: self.wait_for_selector_visible(".embedded-dataset") self.screenshot("workflow_report_custom_1") + @selenium_test + @managed_history + def test_execution_with_null_optional_select_from_data(self): + self.open_in_workflow_run(WORKFLOW_SELECT_FROM_OPTIONAL_DATASET) + self.workflow_run_submit() + history_id = self.current_history_id() + self.workflow_populator.wait_for_history_workflows(history_id, expected_invocation_count=1) + def open_in_workflow_run(self, yaml_content): name = self.workflow_upload_yaml_with_random_name(yaml_content) self.workflow_run_with_name(name)