Skip to content

Commit 6bd8c8e

Browse files
committed
Wait for options to be shown before pressing Tab
1 parent 841efbf commit 6bd8c8e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ describe("SuggestBox", () => {
200200
});
201201

202202
await userEvent.click(screen.getByRole("combobox"));
203+
204+
expect(screen.getAllByRole("option")).not.toHaveLength(0);
205+
203206
await userEvent.keyboard("{Enter}");
204207

205208
expect(screen.queryByRole("option")).not.toBeInTheDocument();
@@ -211,6 +214,9 @@ describe("SuggestBox", () => {
211214
});
212215

213216
await userEvent.click(screen.getByRole("combobox"));
217+
218+
expect(screen.getAllByRole("option")).not.toHaveLength(0);
219+
214220
await userEvent.keyboard("{Tab}");
215221

216222
expect(screen.queryByRole("option")).not.toBeInTheDocument();

0 commit comments

Comments
 (0)