chore: remove legacy SSR checks and consolidate migration maintenance

This commit is contained in:
maoyingjie
2026-10-26 10:32:22 +08:00
parent 52a0bef851
commit 60af6ee40b
169 changed files with 958 additions and 8422 deletions
-24
View File
@@ -322,30 +322,6 @@ describe("shared text fields", () => {
});
});
it("hydrates standard field composition without ID or attribute mismatch", async () => {
const { createSSRApp } = await import("vue");
const { renderToString } = await import("@vue/server-renderer");
const app = { render: () => textField({ name: "ssr", isInvalid: true }) };
const html = await renderToString(createSSRApp(app));
const container = document.createElement("div");
container.innerHTML = html;
document.body.append(container);
const warn = vi.spyOn(console, "warn").mockImplementation(() => {}),
error = vi.spyOn(console, "error").mockImplementation(() => {});
const client = createSSRApp(app);
client.mount(container);
await settle();
expect(warn.mock.calls.flat().join(" ")).not.toMatch(/hydration/i);
expect(error.mock.calls.flat().join(" ")).not.toMatch(/hydration/i);
const control = container.querySelector("input")!;
for (const id of control.getAttribute("aria-describedby")!.split(" "))
expect(container.querySelector(`[id="${id}"]`)).not.toBeNull();
client.unmount();
container.remove();
warn.mockRestore();
error.mockRestore();
});
it("labels an explicit control id and follows dynamic changes", async () => {
const id = ref("custom");
const w = mount(