

























@@ -98,6 +98,25 @@ describe("renderSkills", () => {
9898}
9999});
100100101+it("defers detail dialog opening until the dialog is connected", async () => {
102+const container = document.createElement("div");
103+const showModal = vi.fn(function (this: HTMLDialogElement) {
104+expect(this.isConnected).toBe(true);
105+this.setAttribute("open", "");
106+});
107+108+installDialogMethod("showModal", showModal);
109+110+render(renderSkills(createProps({ detailKey: "repo-skill" })), container);
111+document.body.append(container);
112+dialogRestores.push(() => container.remove());
113+114+await Promise.resolve();
115+116+expect(showModal).toHaveBeenCalledTimes(1);
117+expect(container.querySelector("dialog")?.hasAttribute("open")).toBe(true);
118+});
119+101120it("opens detail dialogs and routes ClawHub actions", async () => {
102121const container = document.createElement("div");
103122document.body.append(container);
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。