fix(ci): deflake seam-in-branch badge test — wait for graph hydration before Save, extend badge waitFor timeout

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-06-04 15:51:29 -07:00
parent 43e5601740
commit 86867c57b0

View File

@@ -213,11 +213,16 @@ describe("WorkflowNodeEditor — U10 columns/traits/holds", () => {
);
render(<WorkflowNodeEditor isOpen onClose={() => {}} 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 },
);
});