Stop the capture script seeding a node into a populated flow
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H7LwYgJfpkbLCTeiAf8U4A
This commit is contained in:
@@ -117,6 +117,13 @@ async function captureFlows(page, dir) {
|
||||
await page.getByTestId("create-flow").click()
|
||||
}
|
||||
await page.waitForURL(/\/flows\/.+/, { timeout: 15000 })
|
||||
// The canvas paints before the flow detail arrives, so counting nodes right
|
||||
// away reads 0 for a populated flow — and the seeding below would then add a
|
||||
// node to somebody's real flow. Wait until it says which of the two it is.
|
||||
await page
|
||||
.locator(".react-flow__node, [data-testid=flow-empty]")
|
||||
.first()
|
||||
.waitFor({ timeout: 15000 })
|
||||
|
||||
if (!(await page.locator(".react-flow__node").count())) {
|
||||
await page.getByTestId("add-node").click()
|
||||
|
||||
@@ -984,7 +984,10 @@ function FlowEditorInner({
|
||||
</div>
|
||||
|
||||
{definitions.length === 0 ? (
|
||||
<div className="pointer-events-none absolute inset-0 flex items-center justify-center">
|
||||
<div
|
||||
className="pointer-events-none absolute inset-0 flex items-center justify-center"
|
||||
data-testid="flow-empty"
|
||||
>
|
||||
<div className="flex flex-col items-center gap-3 text-center">
|
||||
<span className="flex size-14 items-center justify-center rounded-full bg-muted text-muted-foreground">
|
||||
<Workflow className="size-6" />
|
||||
|
||||
Reference in New Issue
Block a user