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()
|
||||
|
||||
Reference in New Issue
Block a user