From 86867c57b045578b1d8b07ef0bf094d0949e7905 Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Thu, 4 Jun 2026 15:51:29 -0700 Subject: [PATCH] =?UTF-8?q?fix(ci):=20deflake=20seam-in-branch=20badge=20t?= =?UTF-8?q?est=20=E2=80=94=20wait=20for=20graph=20hydration=20before=20Sav?= =?UTF-8?q?e,=20extend=20badge=20waitFor=20timeout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- .../app/components/__tests__/WorkflowNodeEditor.test.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/dashboard/app/components/__tests__/WorkflowNodeEditor.test.tsx b/packages/dashboard/app/components/__tests__/WorkflowNodeEditor.test.tsx index 828b35ae85..81f36a4b79 100644 --- a/packages/dashboard/app/components/__tests__/WorkflowNodeEditor.test.tsx +++ b/packages/dashboard/app/components/__tests__/WorkflowNodeEditor.test.tsx @@ -213,11 +213,16 @@ describe("WorkflowNodeEditor — U10 columns/traits/holds", () => { ); render( {}} addToast={addToast} />); + // Wait for graph/column hydration before saving — clicking Save mid-hydration + // races the error→node-badge mapping (same flake class as the v1-save race). + expect(await screen.findByTestId("wf-column-panel")).toBeInTheDocument(); fireEvent.click((await screen.findByText("Save")).closest("button")!); await waitFor(() => expect(updateWorkflow).toHaveBeenCalled()); - await waitFor(() => - expect(screen.getByTestId("wf-node-error-badge")).toHaveTextContent(/forbidden inside a parallel branch/i), + await waitFor( + () => + expect(screen.getByTestId("wf-node-error-badge")).toHaveTextContent(/forbidden inside a parallel branch/i), + { timeout: 5000 }, ); });