Skip to content

Commit

Permalink
test: fix search-modal locator
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Jul 2, 2024
1 parent f902335 commit e485ab3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/search-modal/SearchUI.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,9 @@ describe('<SearchUI />', () => {
const popupMenu = getByRole('group');
const problemFilterCheckbox = getByLabelTextIn(popupMenu, /Problem/i);
fireEvent.click(problemFilterCheckbox, {});
await waitFor(() => { expect(rendered.getByText('Type: Problem')).toBeInTheDocument(); });
await waitFor(() => {
expect(rendered.getByRole('button', { name: /type: problem/i, hidden: true })).toBeInTheDocument();
});
// Now wait for the filter to be applied and the new results to be fetched.
await waitFor(() => { expect(fetchMock).toHaveFetchedTimes(3, searchEndpoint, 'post'); });
// Because we're mocking the results, there's no actual changes to the mock results,
Expand Down

0 comments on commit e485ab3

Please sign in to comment.