diff --git a/packages/editor-ui/src/components/RunData.test.ts b/packages/editor-ui/src/components/RunData.test.ts index e3103893808cd..417bd6fb6157e 100644 --- a/packages/editor-ui/src/components/RunData.test.ts +++ b/packages/editor-ui/src/components/RunData.test.ts @@ -187,6 +187,28 @@ describe('RunData', () => { expect(pinDataButton).toBeDisabled(); }); + it('should render callout when data is pinned in output panel', async () => { + const { getByTestId } = render({ + defaultRunItems: [], + displayMode: 'table', + pinnedData: [{ json: { name: 'Test' } }], + paneType: 'output', + }); + const pinnedDataCallout = getByTestId('ndv-pinned-data-callout'); + expect(pinnedDataCallout).toBeInTheDocument(); + }); + + it('should not render callout when data is pinned in input panel', async () => { + const { queryByTestId } = render({ + defaultRunItems: [], + displayMode: 'table', + pinnedData: [{ json: { name: 'Test' } }], + paneType: 'input', + }); + const pinnedDataCallout = queryByTestId('ndv-pinned-data-callout'); + expect(pinnedDataCallout).not.toBeInTheDocument(); + }); + it('should enable pin data button when data is not pinned', async () => { const { getByTestId } = render({ defaultRunItems: [{ json: { name: 'Test' } }], diff --git a/packages/editor-ui/src/components/RunData.vue b/packages/editor-ui/src/components/RunData.vue index d852d3ee45b88..57d0c8dc8283d 100644 --- a/packages/editor-ui/src/components/RunData.vue +++ b/packages/editor-ui/src/components/RunData.vue @@ -1277,10 +1277,16 @@ defineExpose({ enterEditMode });