chore: remove legacy SSR checks and consolidate migration maintenance
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user