From fd25753f5e7b4331ffd8e2797070ff6b0e8c3e8f Mon Sep 17 00:00:00 2001 From: Anton Arnautov Date: Wed, 1 Mar 2023 10:32:33 +0100 Subject: [PATCH] test(Reactions): adjust tests for removal of angry reaction --- .../Reactions/__tests__/ReactionSelector.test.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/Reactions/__tests__/ReactionSelector.test.js b/src/components/Reactions/__tests__/ReactionSelector.test.js index 1393df48c..bfc2ed77d 100644 --- a/src/components/Reactions/__tests__/ReactionSelector.test.js +++ b/src/components/Reactions/__tests__/ReactionSelector.test.js @@ -57,7 +57,7 @@ describe('ReactionSelector', () => { const { container, queryAllByTestId } = renderComponent(); await waitFor(() => { - expect(queryAllByTestId('sprite-image')).toHaveLength(6); + expect(queryAllByTestId('sprite-image')).toHaveLength(5); }); const results = await axe(container); @@ -112,21 +112,21 @@ describe('ReactionSelector', () => { it('should render the count of reactions for each reaction', async () => { const love = 1; - const angry = 2; + const haha = 2; const { container, getByText } = renderComponent({ reaction_counts: { - angry, + haha, love, }, }); const loveCount = getByText(`${love}`); - const angryCount = getByText(`${angry}`); + const hahaCount = getByText(`${haha}`); expect(loveCount).toBeInTheDocument(); - expect(angryCount).toBeInTheDocument(); + expect(hahaCount).toBeInTheDocument(); expect(loveCount.parentElement).toHaveAttribute('data-text', 'love'); - expect(angryCount.parentElement).toHaveAttribute('data-text', 'angry'); + expect(hahaCount.parentElement).toHaveAttribute('data-text', 'haha'); const results = await axe(container); expect(results).toHaveNoViolations(); });