mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 10:51:06 +00:00
fix(list-box-selection): fix aria-label
for clear button
This commit is contained in:
parent
c6c80d35a9
commit
3f2bcf75a0
3 changed files with 16 additions and 5 deletions
|
@ -193,6 +193,16 @@ describe("ComboBox", () => {
|
|||
expect(screen.getByRole("listbox")).toHaveClass("bx--list-box--up");
|
||||
});
|
||||
|
||||
it("should clear filter on selection clear", async () => {
|
||||
render(ComboBoxCustom, { props: { selectedId: "1" } });
|
||||
|
||||
const clearButton = screen.getByLabelText("Clear selected item");
|
||||
await user.click(clearButton);
|
||||
|
||||
const input = screen.getByRole("textbox");
|
||||
expect(input).toHaveValue("");
|
||||
});
|
||||
|
||||
it("should programmatically clear selection", async () => {
|
||||
render(ComboBoxCustom, { props: { selectedId: "1" } });
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue