refactor(webui): narrow floating control migration

This commit is contained in:
Xubin Ren
2026-08-04 18:05:34 +08:00
parent 28ec8a1b47
commit fa65a01977
12 changed files with 129 additions and 642 deletions
+1 -9
View File
@@ -86,6 +86,7 @@ describe("combobox navigation", () => {
const input = screen.getByRole("combobox", { name: "Options" });
fireEvent.keyDown(input, { key: "ArrowDown" });
fireEvent.keyDown(input, { key: "Escape" });
expect(screen.queryByRole("listbox", { name: "Available options" })).not.toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Open options" }));
const selectedOption = screen.getByRole("option", { name: "Beta" });
@@ -107,13 +108,4 @@ describe("combobox navigation", () => {
expect(event.defaultPrevented).toBe(false);
});
it("closes the listbox on Escape", () => {
render(<ComboboxHarness />);
fireEvent.keyDown(screen.getByRole("combobox", { name: "Options" }), {
key: "Escape",
});
expect(screen.queryByRole("listbox", { name: "Available options" })).not.toBeInTheDocument();
});
});