Skip to content

Commit

Permalink
improve code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
im-vedant committed Dec 29, 2024
1 parent fb4ad84 commit b18f150
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
waitFor,
act,
waitForElementToBeRemoved,
fireEvent,
} from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { MockedProvider } from '@apollo/client/testing';
Expand Down Expand Up @@ -286,7 +287,11 @@ describe('Testing Agenda Categories Component', () => {
const searchInput = await screen.findByTestId('searchByName');
expect(searchInput).toBeInTheDocument();

userEvent.type(searchInput, 'Category[Enter]');
userEvent.type(searchInput, 'Category');
await act(async () => {
fireEvent.keyUp(searchInput, { key: 'Enter' });
});
screen.debug();
await waitFor(() => {
expect(screen.getAllByText('Category').length).toBe(2);
});
Expand Down

0 comments on commit b18f150

Please sign in to comment.