Commit 6c9bc27d authored by John Chilton's avatar John Chilton
Browse files

More test coverage for workflow running with collections.

parent cf6a1a4f
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -605,6 +605,18 @@ class NavigatesGalaxy(HasDriver):
            raise self.prepend_timeout_message(e, message)
        return history_item_selector_state

    def history_panel_wait_for_and_select(self, hids: List[int]):
        """
        Waits for uploads to pass through queued, running, ok. Not all the states are not guaranteed
        depending on how fast the upload goes compared to the history polling updates, it might just
        skip to the end for a really fast upload
        """
        for hid in hids:
            self.history_panel_wait_for_hid_ok(hid)
        self.history_panel_multi_operations_show()
        for hid in hids:
            self.history_panel_muli_operation_select_hid(hid)

    @retry_during_transitions
    def get_grid_entry_names(self, selector):
        self.sleep_for(self.wait_types.UX_RENDER)
+12 −0
Original line number Diff line number Diff line
@@ -892,6 +892,18 @@ steps:
"""


WORKFLOW_LIST_PAIRED_OR_UNPAIRED_INPUT = """
class: GalaxyWorkflow
inputs:
  - id: input_list
    type: collection
    collection_type: "list:paired_or_unpaired"
steps:
  - tool_id: collection_list_paired_or_unpaired
    in:
      f1: input_list
"""


WORKFLOW_WITH_OUTPUTS = """
class: GalaxyWorkflow
+1 −10
Original line number Diff line number Diff line
@@ -175,16 +175,7 @@ class TestCollectionBuilders(SeleniumTestCase):
        return self.use_bootstrap_dropdown(option=option_description, menu="selected content menu")

    def _wait_for_and_select(self, hids):
        """
        Waits for uploads to pass through queued, running, ok. Not all the states are not guaranteed
        depending on how fast the upload goes compared to the history polling updates, it might just
        skip to the end for a really fast upload
        """
        for hid in hids:
            self.history_panel_wait_for_hid_ok(hid)
        self.history_panel_multi_operations_show()
        for hid in hids:
            self.history_panel_muli_operation_select_hid(hid)
        self.history_panel_wait_for_and_select(hids)

    def _show_hidden_content(self):
        """Switches the hidden filter toggle on"""
+66 −1
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ from typing_extensions import Literal
from galaxy_test.base import rules_test_data
from galaxy_test.base.workflow_fixtures import (
    WORKFLOW_LIST_PAIRED_MAPPED_OVER_PAIRED,
    WORKFLOW_LIST_PAIRED_OR_UNPAIRED_INPUT,
    WORKFLOW_NESTED_REPLACEMENT_PARAMETER,
    WORKFLOW_NESTED_RUNTIME_PARAMETER,
    WORKFLOW_NESTED_SIMPLE,
@@ -402,6 +403,70 @@ steps: {}
        invocation = self.workflow_populator.get_invocation(invocations[-1]["id"])
        assert invocation["inputs"]["0"]["id"] == dataset["id"]

    @selenium_test
    @managed_history
    def test_workflow_run_list_paired_or_unpaired_with_paired_list(self):
        history_id = self.current_history_id()
        self.perform_upload_of_pasted_content(
            {
                "foo_1.fasta": "forward content",
                "foo_2.fasta": "reverse content",
            }
        )
        self.history_panel_wait_for_and_select([1, 2])
        self.history_panel_build_list_of_pairs()
        self.collection_builder_set_name("my awesome paired list")
        self.collection_builder_create()
        self.history_panel_wait_for_hid_ok(5)
        self._create_and_run_workflow_with_unique_name(WORKFLOW_LIST_PAIRED_OR_UNPAIRED_INPUT)
        self.workflow_run_submit()
        self.history_panel_wait_for_hid_ok(6)
        content = self.dataset_populator.get_history_dataset_content(history_id, hid=6)
        assert content.strip() == "forward content\nreverse content"

    @selenium_test
    @managed_history
    def test_workflow_run_list_paired_or_unpaired_with_flat_list(self):
        history_id = self.current_history_id()
        self.perform_upload_of_pasted_content(
            {
                "foo_1.fasta": "forward content",
                "foo_2.fasta": "reverse content",
            }
        )
        self.history_panel_wait_for_and_select([1, 2])
        self.history_panel_build_list_advanced_and_select_builder("list")
        self.collection_builder_set_name("my awesome flat list")
        self.collection_builder_create()
        self.history_panel_wait_for_hid_ok(5)
        self._create_and_run_workflow_with_unique_name(WORKFLOW_LIST_PAIRED_OR_UNPAIRED_INPUT)
        self.workflow_run_submit()
        self.history_panel_wait_for_hid_ok(6)
        content = self.dataset_populator.get_history_dataset_content(history_id, hid=6)
        assert content.strip() == "reverse content\nforward content"

    @selenium_test
    @managed_history
    def test_workflow_run_list_paired_or_unpaired_with_mixed_list(self):
        history_id = self.current_history_id()
        self.perform_upload_of_pasted_content(
            {
                "foo_1.fasta": "forward content",
                "foo_2.fasta": "reverse content",
                "other.fasta": "unpaired content",
            }
        )
        self.history_panel_wait_for_and_select([1, 2, 3])
        self.history_panel_build_list_of_paired_or_unpaireds()
        self.collection_builder_set_name("my awesome flat list")
        self.collection_builder_create()
        self.history_panel_wait_for_hid_ok(7)
        self._create_and_run_workflow_with_unique_name(WORKFLOW_LIST_PAIRED_OR_UNPAIRED_INPUT)
        self.workflow_run_submit()
        self.history_panel_wait_for_hid_ok(8)
        content = self.dataset_populator.get_history_dataset_content(history_id, hid=8)
        assert content.strip() == "forward content\nreverse content\nunpaired content"

    @selenium_test
    @managed_history
    def test_upload_dataset_from_workflow_simple(self):