Stop the capture script seeding a node into a populated flow

This commit is contained in:
2026-08-16 17:25:28 +02:00
parent 637635560d
commit e31dda228b
2 changed files with 11 additions and 1 deletions
+7
View File
@@ -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()