From f7680a67a1eeb69221f56d7aed3b5d29d4ce4da9 Mon Sep 17 00:00:00 2001 From: huyz <739820174@qq.com> Date: Tue, 29 Sep 2026 12:23:34 +0800 Subject: [PATCH] test(renderer): explicit budgets for the remaining full-App edge tests After the toolbar test got its 15s budget (#531), the next-slowest full-App tests surfaced at the 5s edge on macOS runners: the turn-link re-anchor test timed out on four consecutive runs across #527/#522/#513, and the HireDrawer binding and docs undo/redo tests each timed out once under the same runner load. Give all three the same explicit 15s budget the other heavy tests in these files already carry. --- apps/desktop/renderer/test/App.test.tsx | 12 +++++++++--- apps/desktop/renderer/test/docs-lifecycle.test.tsx | 5 ++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/apps/desktop/renderer/test/App.test.tsx b/apps/desktop/renderer/test/App.test.tsx index 3aa008d3..33306d47 100644 --- a/apps/desktop/renderer/test/App.test.tsx +++ b/apps/desktop/renderer/test/App.test.tsx @@ -1549,6 +1549,9 @@ describe("App runtime bridge", () => { expect(await screen.findByText("没有可撤销的组织调整")).toBeInTheDocument(); }); + // Full-App render with the hire drawer round-trip; a macOS runner timeout + // was observed at the 5s default (#529). 15s matches the other full-App + // tests in this file. it.each(["codex", "codex-local"] as const)("binds the ready %s runtime in HireDrawer and sends it through POST /hire", async (agentEngine) => { const hire = vi.fn().mockResolvedValue({ status: 200, @@ -1605,7 +1608,7 @@ describe("App runtime bridge", () => { })); expect(orgApply).not.toHaveBeenCalled(); expect(await screen.findByText("文档负责人 已加入团队")).toBeInTheDocument(); - }); + }, 15_000); it("requires dismissal confirmation and invokes one-click restore through typed IPC", async () => { const childSnapshot = { ...snapshot, positionCount: 2, depth: 2, tree: [{ ...snapshot.tree[0]!, children: [{ id: "docs-writer", reportTo: "repo-owner", budget: snapshot.tree[0]!.budget, children: [] }] }] }; @@ -2664,7 +2667,10 @@ it("opens project management independently from Goals through the module rail", expect(screen.queryByRole("heading", { name: "项目管理", level: 1 })).not.toBeInTheDocument(); }); -it("reanchors a repeated project turn link without replacing the conversation draft", async () => { + // Full-App render with two module switches and turn-link re-anchors, so on + // slower runners it sits above the 5s default (#529). 15s matches the + // other full-App tests in this file. + it("reanchors a repeated project turn link without replacing the conversation draft", async () => { const scrollIntoView = vi.fn(); Object.defineProperty(Element.prototype, "scrollIntoView", { configurable: true, value: scrollIntoView }); const detail: GoalDetail = { @@ -2700,7 +2706,7 @@ it("reanchors a repeated project turn link without replacing the conversation dr } expect(bridge.createTurn).not.toHaveBeenCalled(); expect(bridge.createSessionTurn).not.toHaveBeenCalled(); -}); +}, 15_000); it("counts only actionable inbox items and opens an approval's exact employee session and turn", async () => { const scrollIntoView = vi.fn(); diff --git a/apps/desktop/renderer/test/docs-lifecycle.test.tsx b/apps/desktop/renderer/test/docs-lifecycle.test.tsx index 061eb236..53601949 100644 --- a/apps/desktop/renderer/test/docs-lifecycle.test.tsx +++ b/apps/desktop/renderer/test/docs-lifecycle.test.tsx @@ -704,6 +704,9 @@ describe("DocsPanel knowledge lifecycle (#347)", () => { expect(writeDoc).not.toHaveBeenCalled(); }); + // Renders the full DocsPanel editor and walks autosave plus two reading + // mode round-trips; a macOS runner timeout was observed at the 5s default + // (#529). 15s matches the other heavy component tests. it("preserves undo and redo history across reading mode after autosave", async () => { const writeDoc = vi.fn(async (_id: string, _path: string, content: string) => ({ ...KNOWLEDGE, content, version: "2026-08-27T00:00:02.000Z", @@ -746,7 +749,7 @@ describe("DocsPanel knowledge lifecycle (#347)", () => { await waitFor(() => expect(writeDoc.mock.calls.map(call => call[2])).toEqual([ "# Changed\n", "# Knowledge\n", "# Changed\n", ])); - }); + }, 15_000); it("navigates note links and explicitly creates a missing target", async () => { const linked = {