Skip to content

Commit

Permalink
Label dces as either dataset collection or dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Sep 9, 2023
1 parent 6799ce0 commit 7a9786f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
12 changes: 6 additions & 6 deletions client/src/components/Form/Elements/FormData/FormData.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe("FormData", () => {
expect(options.at(0).classes()).toContain("active");
expect(options.at(0).attributes("title")).toBe("Single dataset");
expect(wrapper.emitted().input[0][0]).toEqual(value_0);
expect(wrapper.find(SELECTED_VALUE).text()).toEqual("dceName4 (dce)");
expect(wrapper.find(SELECTED_VALUE).text()).toEqual("dceName4 (as dataset)");
await wrapper.setProps({ value: value_0 });
expect(wrapper.emitted().input.length).toEqual(1);
await wrapper.setProps({ value: { values: [{ id: "hda2", src: "hda" }] } });
Expand Down Expand Up @@ -167,7 +167,7 @@ describe("FormData", () => {
expect(wrapper.emitted().input.length).toEqual(1);
const selectedValues = wrapper.findAll(SELECTED_VALUE);
expect(selectedValues.length).toBe(1);
expect(selectedValues.at(0).text()).toBe("dceName1 (dce)");
expect(selectedValues.at(0).text()).toBe("dceName1 (as dataset)");
});

it("dataset collection element as hdca without map_over_type", async () => {
Expand All @@ -180,7 +180,7 @@ describe("FormData", () => {
await wrapper.vm.$nextTick();
const selectedValues = wrapper.findAll(SELECTED_VALUE);
expect(selectedValues.length).toBe(1);
expect(selectedValues.at(0).text()).toBe("dceName2 (dce)");
expect(selectedValues.at(0).text()).toBe("dceName2 (as dataset collection)");
});

it("dataset collection element as hdca mapped to batch field", async () => {
Expand All @@ -197,7 +197,7 @@ describe("FormData", () => {
await wrapper.vm.$nextTick();
const selectedValues = wrapper.findAll(SELECTED_VALUE);
expect(selectedValues.length).toBe(1);
expect(selectedValues.at(0).text()).toBe("dceName3 (dce)");
expect(selectedValues.at(0).text()).toBe("dceName3 (as dataset collection)");
});

it("dataset collection element as hdca mapped to non-batch field", async () => {
Expand All @@ -215,7 +215,7 @@ describe("FormData", () => {
await wrapper.vm.$nextTick();
const selectedValues = wrapper.findAll(SELECTED_VALUE);
expect(selectedValues.length).toBe(1);
expect(selectedValues.at(0).text()).toBe("dceName3 (dce)");
expect(selectedValues.at(0).text()).toBe("dceName3 (as dataset collection)");
});

it("dataset collection mapped to non-batch field", async () => {
Expand Down Expand Up @@ -363,7 +363,7 @@ describe("FormData", () => {
values: [{ id: "dce4", map_over_type: null, src: "dce" }],
});
const newSelectedValues = wrapper.findAll(SELECTED_VALUE);
expect(newSelectedValues.at(0).text()).toBe("dceName4 (dce)");
expect(newSelectedValues.at(0).text()).toBe("dceName4 (as dataset)");
});

it("tagging filter", async () => {
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/Form/Elements/FormData/FormData.vue
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,9 @@ const formattedOptions = computed(() => {
if (Array.isArray(otherOptions)) {
otherOptions.forEach((option) => {
const keepKey = `${option.id}_${option.src}`;
const sourceLabel = getSourceLabel(getSourceType(option));
const newOption = {
label: `${option.name} (${option.src})`,
label: `${option.name} (as ${sourceLabel})`,
value: option || null,
};
keepOptions[keepKey] = newOption;
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy_test/selenium/test_tool_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def test_rerun_dataset_collection_element(self):
self.hda_click_primary_action_button(1, "rerun")
self.sleep_for(self.wait_types.UX_RENDER)
select_field = self.components.tool_form.parameter_data_select(parameter="input1")
self.select_set_value(select_field, "test0 (dce)")
self.select_set_value(select_field, "test0 (as dataset collection)")
self.tool_form_execute()
self.components.history_panel.collection_view.back_to_history.wait_for_and_click()
self.history_panel_wait_for_hid_ok(9)
Expand Down

0 comments on commit 7a9786f

Please sign in to comment.