remove act wrapping of userEvent

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-10-14 14:21:41 +02:00
parent 0696ef1a34
commit 7e045eb0c3
6 changed files with 20 additions and 19 deletions
@@ -15,7 +15,7 @@
*/
import { MockConfigApi, TestApiProvider } from '@backstage/test-utils';
import { screen, render, waitFor, within, act } from '@testing-library/react';
import { screen, render, waitFor, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import React from 'react';
@@ -364,7 +364,7 @@ describe('SearchFilter.Autocomplete', () => {
});
// Blur the field and only one tag should be shown with a +1.
await act(() => userEvent.tab());
await userEvent.tab();
expect(
screen.queryByRole('button', { name: values[0] }),
).not.toBeInTheDocument();