search-react: test fix for RTL 14
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user