From 25eb82eec147f5b4815dcabb39de57ef95792fc5 Mon Sep 17 00:00:00 2001 From: Camila Belo Date: Fri, 9 Jun 2023 14:07:09 +0200 Subject: [PATCH] fix(explore): tools card header Signed-off-by: Camila Belo --- plugins/explore/src/components/ToolCard/ToolCard.test.tsx | 8 ++++++-- plugins/explore/src/components/ToolCard/ToolCard.tsx | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/explore/src/components/ToolCard/ToolCard.test.tsx b/plugins/explore/src/components/ToolCard/ToolCard.test.tsx index a216f65c5d..20bf6bb594 100644 --- a/plugins/explore/src/components/ToolCard/ToolCard.test.tsx +++ b/plugins/explore/src/components/ToolCard/ToolCard.test.tsx @@ -36,8 +36,12 @@ describe('', () => { }); it('renders props correctly', () => { - const { getByText } = render(wrapInTestApp()); - expect(getByText(minProps.card.title)).toBeInTheDocument(); + const { getByRole, getByText } = render( + wrapInTestApp(), + ); + expect( + getByRole('heading', { name: minProps.card.title }), + ).toBeInTheDocument(); expect(getByText(minProps.card.description)).toBeInTheDocument(); }); diff --git a/plugins/explore/src/components/ToolCard/ToolCard.tsx b/plugins/explore/src/components/ToolCard/ToolCard.tsx index f6137d9c01..a39806dceb 100644 --- a/plugins/explore/src/components/ToolCard/ToolCard.tsx +++ b/plugins/explore/src/components/ToolCard/ToolCard.tsx @@ -74,7 +74,7 @@ export const ToolCard = ({ card, objectFit }: Props) => { })} /> - + {title}{' '} {lifecycle && lifecycle.toLocaleLowerCase('en-US') !== 'ga' && (