From 42091957437f559420e4cef2ffe5191dca70403d Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Fri, 5 Jun 2026 09:44:45 -0700 Subject: [PATCH] =?UTF-8?q?fix(ci):=20deflake=20foreach=20palette=20test?= =?UTF-8?q?=20=E2=80=94=20wait=20for=20graph=20hydration=20before=20the=20?= =?UTF-8?q?palette=20click,=20extend=20node=20waitFor=20timeout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/components/__tests__/WorkflowNodeEditor.test.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/dashboard/app/components/__tests__/WorkflowNodeEditor.test.tsx b/packages/dashboard/app/components/__tests__/WorkflowNodeEditor.test.tsx index b50247af1e..df43f22802 100644 --- a/packages/dashboard/app/components/__tests__/WorkflowNodeEditor.test.tsx +++ b/packages/dashboard/app/components/__tests__/WorkflowNodeEditor.test.tsx @@ -378,10 +378,17 @@ describe("WorkflowNodeEditor — U8 step-inversion authoring", () => { render( {}} addToast={() => {}} />); await screen.findByText("Save"); + // Wait for graph/column hydration before driving the palette — clicking + // mid-hydration races the flow-state seeding and the added node may never + // render (same flake class as the seam-in-branch badge deflake, 86867c57b). + expect(await screen.findByTestId("wf-column-panel")).toBeInTheDocument(); // Adding a foreach renders a group node with an empty inspector hint absent // (it has a child) and an inspector for the foreach. fireEvent.click(screen.getByText("For-each step").closest("button")!); - await waitFor(() => expect(screen.getByTestId("wf-node-foreach")).toBeInTheDocument()); + await waitFor( + () => expect(screen.getByTestId("wf-node-foreach")).toBeInTheDocument(), + { timeout: 5000 }, + ); // The foreach inspector shows the Mode select (KTD-3). expect(screen.getByText("Mode")).toBeInTheDocument(); // No empty-state hint because the palette seeded a step-execute child.