feat(export): add DB2 comments to XLSX headers

This commit is contained in:
大峰 authored and GitHub committed 2026-07-29 22:37:05 +08:00
1 parent 51b5c8ae95
commit 843f945581
35 files changed
+640 -87

No files matched your search

@@ -0,0 +1,33 @@
// @vitest-environment happy-dom
import { createApp, nextTick } from "vue";
import { afterEach, describe, expect, it } from "vitest";
import i18n from "@/i18n";
import XlsxHeaderDialog from "../XlsxHeaderDialog.vue";
describe("XlsxHeaderDialog", () => {
afterEach(() => {
document.body.innerHTML = "";
});
it("emits cancel when the built-in close button dismisses the dialog", async () => {
const container = document.createElement("div");
document.body.appendChild(container);
let cancelCount = 0;
const app = createApp(XlsxHeaderDialog, {
open: true,
onCancel: () => {
cancelCount += 1;
},
});
app.use(i18n);
app.mount(container);
await nextTick();
document.querySelector<HTMLElement>('[data-slot="dialog-close"]')!.click();
await nextTick();
expect(cancelCount).toBe(1);
app.unmount();
});
});