Skip to content

Commit

Permalink
Merge pull request galaxyproject#19420 from ElectronicBlueberry/dupli…
Browse files Browse the repository at this point in the history
…cate-subworkflows-button

Enable cloning subworkflows
  • Loading branch information
ElectronicBlueberry authored Jan 20, 2025
2 parents 28e5f7d + 9d0ce93 commit 5f484fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 3 additions & 4 deletions client/src/components/Workflow/Editor/Node.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,17 @@ describe("Node", () => {
},
});
await flushPromises();

// fa-wrench is the tool icon ...
expect(wrapper.findAll(".fa-wrench")).toHaveLength(1);
const toolLinks = wrapper.findAll("i");
expect(toolLinks.length).toBe(3);
await wrapper.setProps({
step: { label: "step label", type: "subworkflow", inputs: [], outputs: [], position: { top: 0, left: 0 } },
});

// fa-sitemap is the subworkflow icon ...
expect(wrapper.findAll(".fa-sitemap")).toHaveLength(1);
expect(wrapper.findAll(".fa-wrench")).toHaveLength(0);
const subworkflowLinks = wrapper.findAll("i");
expect(subworkflowLinks.length).toBe(2);

const workflowTitle = wrapper.find(".node-title");
expect(workflowTitle.text()).toBe("step label");
});
Expand Down
3 changes: 1 addition & 2 deletions client/src/components/Workflow/Editor/Node.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<b-button-group class="float-right">
<LoadingSpan v-if="isLoading" spinner-only />
<b-button
v-if="canClone && !readonly"
v-if="!readonly"
v-b-tooltip.hover
class="node-clone py-0"
variant="primary"
Expand Down Expand Up @@ -241,7 +241,6 @@ const title = computed(() => props.step.label || props.step.name);
const idString = computed(() => `wf-node-step-${props.id}`);
const showRule = computed(() => props.step.inputs?.length > 0 && props.step.outputs?.length > 0);
const iconClass = computed(() => `icon fa fa-fw ${WorkflowIcons[props.step.type]}`);
const canClone = computed(() => props.step.type !== "subworkflow"); // Why ?
const isEnabled = getGalaxyInstance().config.enable_tool_recommendations; // getGalaxyInstance is not reactive
const isActive = computed(() => props.id === props.activeNodeId);
Expand Down

0 comments on commit 5f484fc

Please sign in to comment.