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:
@@ -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 },
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user