From 3252236528a2cc0f4bade3420021d7ca77715e04 Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Tue, 9 Jun 2026 03:17:20 -0700 Subject: [PATCH] FN-6061: stabilize WorkflowNodeEditor rename race test Wait for the workflow editor to finish hydrating before exercising the inline rename flow. - wait for the Save action and rendered column inputs before clicking the workflow name strip - switch the workflow name click to a synchronous lookup once the editor is stable - preserve the dirty-rename cancel assertion while removing the hydration race from the test Files changed: packages/dashboard/app/components/__tests__/WorkflowNodeEditor.test.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) Fusion-Task-Id: FN-6061 Fusion-Task-Lineage: 3c7d781c-c1de-4c8f-9c15-670d5bf8193f --- .../app/components/__tests__/WorkflowNodeEditor.test.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/dashboard/app/components/__tests__/WorkflowNodeEditor.test.tsx b/packages/dashboard/app/components/__tests__/WorkflowNodeEditor.test.tsx index 7852163d36..650c5f6a32 100644 --- a/packages/dashboard/app/components/__tests__/WorkflowNodeEditor.test.tsx +++ b/packages/dashboard/app/components/__tests__/WorkflowNodeEditor.test.tsx @@ -2222,8 +2222,12 @@ describe("WorkflowNodeEditor — U10 design-with-AI", () => { vi.mocked(designWorkflow).mockResolvedValue(designedResult()); renderWithConfirm( {}} addToast={() => {}} />); + // Wait for the editor to fully stabilize before interacting — clicking + // the name strip mid-hydration races the initial render cycle. + await screen.findByText("Save"); + await waitFor(() => expect(screen.getAllByLabelText(/Column name/i).length).toBeGreaterThan(0)); // Make a dirty edit first (inline rename) so we can prove it survives a cancel. - fireEvent.click(await screen.findByTestId("wf-workflow-name")); + fireEvent.click(screen.getByTestId("wf-workflow-name")); const input = await screen.findByTestId("wf-workflow-name-input"); fireEvent.change(input, { target: { value: "Kept name" } }); fireEvent.keyDown(input, { key: "Enter" });