fix: preserve nested search names and add browser consumption fixture

This commit is contained in:
maoyingjie
2026-10-25 21:08:28 +08:00
parent 647c39035d
commit b129f79366
7 changed files with 253 additions and 6 deletions
+2 -2
View File
@@ -644,13 +644,13 @@ describe("Autocomplete form and validation", () => {
});
describe("Autocomplete composition", () => {
it("keeps a caller-provided aria-label on the trigger and search box", async () => {
it("keeps separate caller-provided names on the trigger and inner SearchField", async () => {
track(shell({}));
await nextTick();
await settle();
expect(trigger().getAttribute("aria-label")).toBe("州");
await open();
expect(search().getAttribute("aria-label")).toBe("州");
expect(search().getAttribute("aria-label")).toBe("搜索州名");
});
it("mounts as a reusable component surface", async () => {