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