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
+1 -27
View File
@@ -1,7 +1,6 @@
import { afterEach, describe, it, expect } from "vitest";
import { mount, flushPromises } from "@vue/test-utils";
import { createSSRApp, defineComponent, ref } from "vue";
import { renderToString } from "@vue/server-renderer";
import { defineComponent, ref } from "vue";
import { CalendarDate, parseZonedDateTime } from "@internationalized/date";
import Field from "../packages/vue/tests/fixtures/AcceptedDateFieldFoundation.vue";
const wrappers: ReturnType<typeof mount>[] = [];
@@ -127,31 +126,6 @@ it("omits disabled native values", () => {
);
expect(data(w)).toEqual([]);
});
it("hydrates the accepted date and segment identities without mismatch", async () => {
const Component = defineComponent({
components: { Field },
setup: () => ({ initial }),
template: '<Field :default-value="initial" name="date"/>',
});
const host = document.createElement("div");
host.innerHTML = await renderToString(createSSRApp(Component));
document.body.append(host);
const before = host.querySelector('[data-reka-date-field-segment="day"]');
const warnings: string[] = [];
const app = createSSRApp(Component);
app.config.warnHandler = (message) => warnings.push(message);
app.mount(host);
await flushPromises();
try {
expect(warnings).toEqual([]);
expect(host.querySelector('[data-reka-date-field-segment="day"]')).toBe(
before,
);
expect(before?.textContent).toBe("10");
} finally {
app.unmount();
}
});
it("preserves partial drafts but clears a completed rejected empty proposal without losing focus", async () => {
const w = fixture(