From b6055c5fe97756f64e6b91a1132d91226fb014aa Mon Sep 17 00:00:00 2001 From: Jaakko Husso Date: Thu, 8 May 2025 17:20:30 +0300 Subject: [PATCH] feat(editor): Change WorkflowCard archived styles (no-changelog) (#15214) --- .../src/components/WorkflowCard.test.ts | 13 +++-- .../editor-ui/src/components/WorkflowCard.vue | 54 +++++++++++++++---- 2 files changed, 51 insertions(+), 16 deletions(-) diff --git a/packages/frontend/editor-ui/src/components/WorkflowCard.test.ts b/packages/frontend/editor-ui/src/components/WorkflowCard.test.ts index 27940e4dc6c..466bbe8dca0 100644 --- a/packages/frontend/editor-ui/src/components/WorkflowCard.test.ts +++ b/packages/frontend/editor-ui/src/components/WorkflowCard.test.ts @@ -314,17 +314,20 @@ describe('WorkflowCard', () => { expect(heading).toHaveTextContent('Read only'); }); - it('should show Archived badge on archived workflows', async () => { + it('should show Archived text on archived workflows', async () => { const data = createWorkflow({ isArchived: true }); - const { getByTestId } = renderComponent({ props: { data } }); + const { getByTestId, queryByTestId } = renderComponent({ props: { data } }); - expect(getByTestId('workflow-archived-tag')).toBeInTheDocument(); + expect(getByTestId('workflow-card-archived')).toBeInTheDocument(); + expect(getByTestId('workflow-card-archived')).toHaveTextContent('Archived'); + expect(queryByTestId('workflow-card-activator')).not.toBeInTheDocument(); }); - it('should not show Archived badge on non archived workflows', async () => { + it('should not show Archived text on non archived workflows', async () => { const data = createWorkflow({ isArchived: false }); const { queryByTestId } = renderComponent({ props: { data } }); - expect(queryByTestId('workflow-archived-tag')).not.toBeInTheDocument(); + expect(queryByTestId('workflow-card-archived')).not.toBeInTheDocument(); + expect(queryByTestId('workflow-card-activator')).toBeInTheDocument(); }); }); diff --git a/packages/frontend/editor-ui/src/components/WorkflowCard.vue b/packages/frontend/editor-ui/src/components/WorkflowCard.vue index e189f395908..f8723584188 100644 --- a/packages/frontend/editor-ui/src/components/WorkflowCard.vue +++ b/packages/frontend/editor-ui/src/components/WorkflowCard.vue @@ -401,22 +401,28 @@ const onBreadcrumbItemClick = async (item: PathItem) => {