diff --git a/packages/frontend/editor-ui/src/app/components/WorkflowCard.test.ts b/packages/frontend/editor-ui/src/app/components/WorkflowCard.test.ts index 2710ec328b7..2fea958f6a2 100644 --- a/packages/frontend/editor-ui/src/app/components/WorkflowCard.test.ts +++ b/packages/frontend/editor-ui/src/app/components/WorkflowCard.test.ts @@ -1441,7 +1441,9 @@ describe('WorkflowCard', () => { const renderCard = (overrides: Partial = {}) => renderComponent({ props: { data: createWorkflow(overrides) } }); - it('shows an amber "Partial publish" indicator with a tooltip when publicationStatus is partial', async () => { + // The tooltip content is teleported and only mounted on hover with a positioned popper, + // which the jsdom harness can't render cleanly, so this asserts the visible indicator only. + it('shows an amber "Partial publish" indicator when publicationStatus is partial', async () => { const { getByTestId, getByText } = renderCard({ publicationStatus: 'partial', activeVersionId: 'v1', @@ -1455,6 +1457,24 @@ describe('WorkflowCard', () => { expect(getByText('Failed publish')).toBeVisible(); }); + it('shows the "Failed publish" indicator for a fully-failed publish with no active version', async () => { + const { getByTestId, getByText } = renderCard({ + publicationStatus: 'failed', + activeVersionId: null, + }); + expect(getByTestId('workflow-card-publish-indicator')).toBeVisible(); + expect(getByText('Failed publish')).toBeVisible(); + }); + + it('shows the "Partial publish" indicator for a partial publish with no active version', async () => { + const { getByTestId, getByText } = renderCard({ + publicationStatus: 'partial', + activeVersionId: null, + }); + expect(getByTestId('workflow-card-publish-indicator')).toBeVisible(); + expect(getByText('Partial publish')).toBeVisible(); + }); + it('falls back to the legacy "Published" indicator when publicationStatus is absent', async () => { const { getByText } = renderCard({ activeVersionId: 'v1' }); expect(getByText('Published')).toBeVisible();