mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
fix(editor): Don't render pinned icon for disabled nodes (#10712)
This commit is contained in:
parent
43713dcd89
commit
879b837581
|
@ -18,6 +18,18 @@ describe('CanvasNodeStatusIcons', () => {
|
|||
expect(getByTestId('canvas-node-status-pinned')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('should not render pinned icon when disabled', () => {
|
||||
const { queryByTestId } = renderComponent({
|
||||
global: {
|
||||
provide: createCanvasNodeProvide({
|
||||
data: { disabled: true, pinnedData: { count: 5, visible: true } },
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
expect(queryByTestId('canvas-node-status-pinned')).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('should render correctly for a running node', () => {
|
||||
const { getByTestId } = renderComponent({
|
||||
global: {
|
||||
|
|
|
@ -15,6 +15,7 @@ const {
|
|||
executionRunning,
|
||||
hasRunData,
|
||||
runDataIterations,
|
||||
isDisabled,
|
||||
} = useCanvasNode();
|
||||
|
||||
const hideNodeIssues = computed(() => false); // @TODO Implement this
|
||||
|
@ -45,7 +46,7 @@ const hideNodeIssues = computed(() => false); // @TODO Implement this
|
|||
</N8nTooltip>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="hasPinnedData && !nodeHelpers.isProductionExecutionPreview.value"
|
||||
v-else-if="hasPinnedData && !nodeHelpers.isProductionExecutionPreview.value && !isDisabled"
|
||||
data-test-id="canvas-node-status-pinned"
|
||||
:class="[$style.status, $style.pinnedData]"
|
||||
>
|
||||
|
|
Loading…
Reference in a new issue