Skip to content

Commit 820989a

Browse files
committed
Wait for option to not be present
1 parent 6bd8c8e commit 820989a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

extensions/ql-vscode/src/view/common/SuggestBox/__tests__/SuggestBox.test.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { render as reactRender, screen } from "@testing-library/react";
1+
import { render as reactRender, screen, waitFor } from "@testing-library/react";
22
import type { SuggestBoxProps } from "../SuggestBox";
33
import { SuggestBox } from "../SuggestBox";
44
import { userEvent } from "@testing-library/user-event";
@@ -219,7 +219,9 @@ describe("SuggestBox", () => {
219219

220220
await userEvent.keyboard("{Tab}");
221221

222-
expect(screen.queryByRole("option")).not.toBeInTheDocument();
222+
await waitFor(() => {
223+
expect(screen.queryByRole("option")).not.toBeInTheDocument();
224+
});
223225
});
224226

225227
it("shows no suggestions with no matching followup options", async () => {

0 commit comments

Comments
 (0)