Skip to content

Commit

Permalink
test(Reactions): adjust tests for removal of angry reaction
Browse files Browse the repository at this point in the history
  • Loading branch information
arnautov-anton committed Mar 8, 2023
1 parent d4eb6ba commit e8a0414
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/components/Reactions/__tests__/ReactionSelector.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
});
Expand Down

0 comments on commit e8a0414

Please sign in to comment.