mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
test(combo-box): add keyboard navigation menu test
This commit is contained in:
parent
f0f69dc95b
commit
b43f682924
1 changed files with 10 additions and 0 deletions
|
@ -412,4 +412,14 @@ describe("ComboBox", () => {
|
|||
render(ComboBox, { props: { helperText: "Help", invalid: true } });
|
||||
expect(screen.queryByText("Help")).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("should not open menu when input is focused via keyboard", async () => {
|
||||
render(ComboBox);
|
||||
|
||||
await user.keyboard("{Tab}");
|
||||
expect(screen.getByRole("textbox")).toHaveFocus();
|
||||
|
||||
const dropdown = screen.queryAllByRole("listbox")[1];
|
||||
expect(dropdown).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue