diff --git a/client/src/components/Form/Elements/FormData/FormData.vue b/client/src/components/Form/Elements/FormData/FormData.vue index 2322b9b17ab8..731a68a824be 100644 --- a/client/src/components/Form/Elements/FormData/FormData.vue +++ b/client/src/components/Form/Elements/FormData/FormData.vue @@ -406,31 +406,8 @@ function onDrop() { } } -/** - * Matches an array of values to available options - */ -const matchedValues = computed(() => { - const values: Array = []; - if (props.value && props.value.values.length > 0) { - props.value.values.forEach((entry) => { - if ("src" in entry && entry.src) { - const options = props.options[entry.src] || []; - const option = options.find((v) => v.id === entry.id && v.src === entry.src); - if (option) { - values.push({ ...option, name: option.name || entry.id }); - } - } - }); - } - return values; -}); - onMounted(() => { - if (props.value) { - $emit("input", createValue(matchedValues.value)); - } else { - $emit("input", createValue(currentValue.value)); - } + $emit("input", createValue(currentValue.value)); }); /** diff --git a/lib/galaxy_test/base/workflow_fixtures.py b/lib/galaxy_test/base/workflow_fixtures.py index 912adecb32f9..7d5397ae0460 100644 --- a/lib/galaxy_test/base/workflow_fixtures.py +++ b/lib/galaxy_test/base/workflow_fixtures.py @@ -1177,3 +1177,43 @@ format: txt location: https://raw.githubusercontent.com/galaxyproject/galaxy/dev/test-data/1.bed """ + +WORKFLOW_WITH_DATA_FILTER = r"""{ + "a_galaxy_workflow": "true", + "annotation": null, + "comments": [], + "format-version": "0.1", + "name": "Export WF4 Assembly HiC (imported from URL) (imported from uploaded file)", + "steps": { + "0": { + "annotation": "With dataset tag : genomescope_model ", + "content_id": null, + "errors": null, + "id": 0, + "input_connections": {}, + "inputs": [ + { + "description": "With dataset tag : genomescope_model ", + "name": "Genomescope Model" + } + ], + "label": "Genomescope Model", + "name": "Input dataset", + "outputs": [], + "position": { + "left": 0, + "top": 0 + }, + "tool_id": null, + "tool_state": "{\"optional\": false, \"format\": [\"txt\"], \"tag\": \"genomescope_model\"}", + "tool_version": null, + "type": "data_input", + "uuid": "a165c531-371f-4073-9cdd-85ce3506586f", + "when": null, + "workflow_outputs": [] + } + }, + "tags": [], + "uuid": "03a95ebe-af1e-4628-ac2f-e7553babfb2f", + "version": 3 +}""" diff --git a/lib/galaxy_test/selenium/test_workflow_run.py b/lib/galaxy_test/selenium/test_workflow_run.py index afb6085b98bf..50b585484166 100644 --- a/lib/galaxy_test/selenium/test_workflow_run.py +++ b/lib/galaxy_test/selenium/test_workflow_run.py @@ -1,4 +1,5 @@ import json +from uuid import uuid4 import yaml from selenium.webdriver.common.by import By @@ -17,6 +18,7 @@ WORKFLOW_WITH_DYNAMIC_OUTPUT_COLLECTION, WORKFLOW_WITH_OLD_TOOL_VERSION, WORKFLOW_WITH_RULES_1, + WORKFLOW_WITH_DATA_FILTER, ) from .framework import ( managed_history, @@ -308,6 +310,24 @@ def test_workflow_run_button_disabled_when_required_input_missing(self): input_element.clear() workflow_run.run_workflow_disabled.wait_for_present() + @selenium_test + @managed_history + def test_workflow_run_tag_filter(self): + history_id = self.current_history_id() + dataset = self.dataset_populator.new_dataset(history_id, wait=True) + self.dataset_populator.tag_dataset(history_id, dataset["id"], tags=["genomescope_model"]) + # Add another possible input that should not be selected + self.dataset_populator.new_dataset(history_id, wait=True) + wf = json.loads(WORKFLOW_WITH_DATA_FILTER) + wf["name"] = str(uuid4()) + workflow_id = self.workflow_populator.create_workflow(wf) + self.workflow_run_with_name(wf["name"]) + self.workflow_run_submit() + self.sleep_for(self.wait_types.HISTORY_POLL) + invocations = self.workflow_populator.workflow_invocations(workflow_id=workflow_id) + invocation = self.workflow_populator.get_invocation(invocations[-1]["id"]) + assert invocation["inputs"]["0"]["id"] == dataset["id"] + def _assert_has_3_lines_after_run(self, hid): self.workflow_run_wait_for_ok(hid=hid) history_id = self.current_history_id()