search-react: test fix for RTL 14

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-10-14 13:40:34 +02:00
parent b3cc6b318a
commit bfee94f0c5
@@ -318,7 +318,7 @@ describe('SearchBar', () => {
</TestApiProvider>,
);
const textbox = screen.getByLabelText('Search');
const textbox = screen.getByLabelText<HTMLInputElement>('Search');
let value = 'value';
await user.type(textbox, value);
@@ -339,6 +339,8 @@ describe('SearchBar', () => {
value = 'new value';
await user.clear(textbox);
await waitFor(() => expect(textbox.value).toBe(''));
// make sure new term is captured
await user.type(textbox, value);
await waitFor(() => {