mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34: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();
|
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', () => {
|
it('should render correctly for a running node', () => {
|
||||||
const { getByTestId } = renderComponent({
|
const { getByTestId } = renderComponent({
|
||||||
global: {
|
global: {
|
||||||
|
|
|
@ -15,6 +15,7 @@ const {
|
||||||
executionRunning,
|
executionRunning,
|
||||||
hasRunData,
|
hasRunData,
|
||||||
runDataIterations,
|
runDataIterations,
|
||||||
|
isDisabled,
|
||||||
} = useCanvasNode();
|
} = useCanvasNode();
|
||||||
|
|
||||||
const hideNodeIssues = computed(() => false); // @TODO Implement this
|
const hideNodeIssues = computed(() => false); // @TODO Implement this
|
||||||
|
@ -45,7 +46,7 @@ const hideNodeIssues = computed(() => false); // @TODO Implement this
|
||||||
</N8nTooltip>
|
</N8nTooltip>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-else-if="hasPinnedData && !nodeHelpers.isProductionExecutionPreview.value"
|
v-else-if="hasPinnedData && !nodeHelpers.isProductionExecutionPreview.value && !isDisabled"
|
||||||
data-test-id="canvas-node-status-pinned"
|
data-test-id="canvas-node-status-pinned"
|
||||||
:class="[$style.status, $style.pinnedData]"
|
:class="[$style.status, $style.pinnedData]"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in a new issue