diff --git a/client/src/components/Panels/ToolPanel.test.ts b/client/src/components/Panels/ToolPanel.test.ts index fab28b1209c..5e7f2b0cf25 100644 --- a/client/src/components/Panels/ToolPanel.test.ts +++ b/client/src/components/Panels/ToolPanel.test.ts @@ -1,5 +1,6 @@ import "jest-location-mock"; +import { getFakeRegisteredUser } from "@tests/test-data"; import { mount } from "@vue/test-utils"; import axios from "axios"; import MockAdapter from "axios-mock-adapter"; @@ -8,6 +9,7 @@ import { createPinia } from "pinia"; import { getLocalVue } from "tests/jest/helpers"; import { ref } from "vue"; +import { useServerMock } from "@/api/client/__mocks__"; import toolsList from "@/components/ToolsView/testData/toolsList.json"; import toolsListInPanel from "@/components/ToolsView/testData/toolsListInPanel.json"; import { useUserLocalStorage } from "@/composables/userLocalStorage"; @@ -28,6 +30,7 @@ interface ToolPanelView { } const localVue = getLocalVue(); +const { server, http } = useServerMock(); const TEST_PANELS_URI = "/api/tool_panels"; const DEFAULT_VIEW_ID = "default"; @@ -90,6 +93,12 @@ describe("ToolPanel", () => { axiosMock.onGet(/\/api\/tool_panels\/.*/).reply(200, toolsListInPanel); } + server.use( + http.get("/api/users/{user_id}", ({ response }) => { + return response(200).json(getFakeRegisteredUser()); + }) + ); + // setting this because for the default view, we just show "Tools" as the name // even though the backend returns "Full Tool Panel" viewsList[DEFAULT_VIEW_ID]!.name = "Tools"; diff --git a/client/src/components/Panels/ToolPanel.vue b/client/src/components/Panels/ToolPanel.vue index a5ebb0ecedb..8b4d2289232 100644 --- a/client/src/components/Panels/ToolPanel.vue +++ b/client/src/components/Panels/ToolPanel.vue @@ -5,6 +5,7 @@ import { storeToRefs } from "pinia"; import { computed, ref, watch } from "vue"; import { useToolStore } from "@/stores/toolStore"; +import { useUserStore } from "@/stores/userStore"; import localize from "@/utils/localization"; import { errorMessageAsString } from "@/utils/simple-error"; @@ -18,6 +19,7 @@ import Heading from "@/components/Common/Heading.vue"; const toolStore = useToolStore(); +const userStore = useUserStore(); const props = defineProps({ dataManagers: { type: Array, default: null }, moduleSections: { type: Array, default: null }, @@ -85,6 +87,7 @@ const toolPanelHeader = computed(() => { async function initializePanel() { try { + await userStore.loadUser(false); await toolStore.fetchPanels(); await toolStore.fetchTools(); await toolStore.initializePanel(); diff --git a/client/src/utils/navigation/navigation.yml b/client/src/utils/navigation/navigation.yml index b8f1e2edcf6..8ecb9973986 100644 --- a/client/src/utils/navigation/navigation.yml +++ b/client/src/utils/navigation/navigation.yml @@ -381,7 +381,7 @@ edit_collection_attributes: tool_panel: selectors: - edam_title: '[data-title="Apply analytical methods to existing data of a specific type."]' + edam_link: 'a[href^="https://edamontology.github.io/edam-browser"]' tool_box: '[data-description="panel toolbox"]' tool_link: 'a[href$$="tool_runner?tool_id=${tool_id}"]' outer_tool_link: '.toolTitle a[href$$="tool_runner?tool_id=${tool_id}"]' diff --git a/lib/galaxy/managers/jobs.py b/lib/galaxy/managers/jobs.py index da13eca0fc0..1394bcec51f 100644 --- a/lib/galaxy/managers/jobs.py +++ b/lib/galaxy/managers/jobs.py @@ -47,9 +47,7 @@ from galaxy.job_metrics import ( Safety, ) from galaxy.managers.collections import DatasetCollectionManager -from galaxy.managers.context import ( - ProvidesUserContext, -) +from galaxy.managers.context import ProvidesUserContext from galaxy.managers.datasets import DatasetManager from galaxy.managers.hdas import HDAManager from galaxy.managers.lddas import LDDAManager @@ -379,7 +377,7 @@ class JobSearch: tool_version: Optional[str], param: ToolStateJobInstancePopulatedT, param_dump: ToolStateDumpedToJsonInternalT, - job_state: Optional[JobStatesT] = (Job.states.OK, Job.states.SKIPPED), + job_state: Optional[JobStatesT] = (Job.states.OK,), require_name_match: bool = True, ): """Search for jobs producing same results using the 'inputs' part of a tool POST.""" diff --git a/lib/galaxy/tools/parameters/dynamic_options.py b/lib/galaxy/tools/parameters/dynamic_options.py index cdd15e551db..f5694b85c46 100644 --- a/lib/galaxy/tools/parameters/dynamic_options.py +++ b/lib/galaxy/tools/parameters/dynamic_options.py @@ -298,8 +298,11 @@ class ParamValueFilter(Filter): def filter_options(self, options: Sequence[ParameterOption], trans, other_values): ref = other_values.get(self.ref_name, None) - if ref is None or is_runtime_value(ref): + if ref is None: ref = [] + elif is_runtime_value(ref) and trans and trans.workflow_building_mode is workflow_building_modes.USE_HISTORY: + # We're in the run form, can't possibly apply a param_value filter. + return options # - for HDCAs the list of contained HDAs is extracted # - single values are transformed in a single element list diff --git a/lib/galaxy_test/api/test_workflows.py b/lib/galaxy_test/api/test_workflows.py index 237b35ae697..69c4308f655 100644 --- a/lib/galaxy_test/api/test_workflows.py +++ b/lib/galaxy_test/api/test_workflows.py @@ -6916,6 +6916,30 @@ steps: options = run_workflow["steps"][0]["inputs"][0]["options"] assert len(options) >= 1 + @skip_without_tool("filter_param_value") + def test_value_restriction_with_filter_param_value(self): + workflow_id = self.workflow_populator.upload_yaml_workflow( + """ +class: GalaxyWorkflow +inputs: + select_text: + type: text + restrictOnConnections: true +steps: + select: + tool_id: filter_param_value + tool_state: + select1: "hg19_value" + in: + select3: select_text +""" + ) + with self.dataset_populator.test_history() as history_id: + run_workflow = self._download_workflow(workflow_id, style="run", history_id=history_id) + options = run_workflow["steps"][0]["inputs"][0]["options"] + assert len(options) == 1 + assert options[0] == ["hg19", "hg19_value", False] + def test_value_restriction_with_select_and_text_param(self): workflow_id = self.workflow_populator.upload_yaml_workflow( """ diff --git a/lib/galaxy_test/selenium/test_edam_tool_panel_views.py b/lib/galaxy_test/selenium/test_edam_tool_panel_views.py index e1c26c0fcf5..cc9619db81e 100644 --- a/lib/galaxy_test/selenium/test_edam_tool_panel_views.py +++ b/lib/galaxy_test/selenium/test_edam_tool_panel_views.py @@ -34,7 +34,7 @@ class TestEdamToolPanelViewsSelenium(SeleniumTestCase): def _assert_displaying_edam_operations(self): tool_panel = self.components.tool_panel tool_panel.toolbox.wait_for_visible() - tool_panel.edam_title.wait_for_visible() + tool_panel.edam_link.wait_for_present() labels = tool_panel.panel_labels.all() assert len(labels) > 0 label0 = labels[0] diff --git a/test/functional/tools/filter_param_value.xml b/test/functional/tools/filter_param_value.xml index 9dc13e8a5a3..beb91f31520 100644 --- a/test/functional/tools/filter_param_value.xml +++ b/test/functional/tools/filter_param_value.xml @@ -1,7 +1,7 @@ Filter input with the param_value '$output' && + echo $select1 > '$output' && echo $select2 >> '$output' ]]> @@ -25,6 +25,13 @@ + + + + + + + @@ -37,8 +44,8 @@ - - + +