Add selenium test for running workflow with optional select dataset

This commit is contained in:
mvdbeek
2021-06-14 20:03:13 +02:00
parent 2af60d602f
commit 2cedaf9f4f
3 changed files with 21 additions and 8 deletions
+10
View File
@@ -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 = """
@@ -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
@@ -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)