Commit 7304573e authored by John Chilton's avatar John Chilton
Browse files

Add selenium test for creating a paired/unpaired list from a workflow input.

parent 6c9bc27d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -123,6 +123,7 @@ const defaultCollectionBuilderType = computed<CollectionBuilderType>(() => {
            v-if="props.showViewCreateOptions && sourceIsCollection && !hasSingleAvailableCollectionBuilderType"
            v-b-tooltip.bottom.hover.noninteractive
            class="d-flex"
            data-description="upload"
            :title="createTitle"
            split
            text="Create"
+2 −0
Original line number Diff line number Diff line
@@ -12,6 +12,8 @@ export function buildersForCollectionType(collectionType: CollectionType): Colle
        return ["list:paired", "paired"];
    } else if (collectionType == "list:paired") {
        return ["list:paired"];
    } else if (collectionType == "list:paired_or_unpaired") {
        return ["list", "list:paired", "list:paired_or_unpaired"];
    } else {
        return [];
    }
+6 −1
Original line number Diff line number Diff line
@@ -352,7 +352,12 @@ const selectedCount = computed(() => {
                    Unselected
                    <span class="font-weight-normal unselected-count"> ({{ unselectedCount }}) </span>
                </span>
                <GButton class="selection-button select" :title="selectText" color="blue" @click="selectAll">
                <GButton
                    class="selection-button select"
                    data-description="select many select all"
                    :title="selectText"
                    color="blue"
                    @click="selectAll">
                    {{ selectText }}
                    <FontAwesomeIcon :icon="faLongArrowAltRight" />
                </GButton>
+1 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ export type GenericPair<T extends HasName> = {
export const COLLECTION_TYPE_TO_LABEL: Record<string, string> = {
    list: "list",
    "list:paired": "list of pairs",
    "list:paired_or_unpaired": "mixed list of paired and unpaired",
    paired: "dataset pair",
};

+28 −0
Original line number Diff line number Diff line
@@ -546,6 +546,34 @@ steps: {}
        content = self.dataset_populator.get_history_dataset_content(history_id, hid=7)
        assert content.strip() == "hello world\nhello world"

    @selenium_test
    @managed_history
    def test_upload_list_paired_or_unpaired_from_workflow(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_hid_ok(3)
        self._create_and_run_workflow_with_unique_name(WORKFLOW_LIST_PAIRED_OR_UNPAIRED_INPUT)
        workflow_run = self.components.workflow_run
        input = workflow_run.input._(label="input_list")
        input.upload.wait_for_and_click()
        builder = workflow_run.input.collection_builder._(label="input_list")
        builder.element_by_hid(hid=3).wait_for_present()
        # self.sleep_for(self.wait_types.UX_TRANSITION)
        builder.select_all.wait_for_and_click()
        input.collection_tab_build_link.wait_for_and_click()
        builder.create.wait_for_and_click()
        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() == "unpaired content\nreverse content\nforward content"

    def _upload_hello_world_for_input(self, workflow_input, count=1, from_hid=1):
        # assumes fresh history...
        for i in range(count):