Delete the flows and users the Playwright specs create

The specs run against a development stack, so every run left a test_flow_*
in someone's flow list. Each spec now tears down what it made in an afterAll,
which runs whether or not the tests passed, and the three copies of the API
helper move into tests/utils/api.ts.
This commit is contained in:
2026-08-16 16:46:07 +02:00
parent d82bba735e
commit 2c9171d415
6 changed files with 79 additions and 62 deletions
+5
View File
@@ -1,4 +1,5 @@
import { expect, type Page, test } from "@playwright/test"
import { deleteAll } from "./utils/api"
/**
* The flow editor's load-bearing behaviour: nodes are placed, connections come
@@ -12,6 +13,10 @@ test.use({ storageState: "playwright/.auth/user.json" })
test.describe.configure({ mode: "serial" })
test.afterAll(async ({ browser }) => {
await deleteAll(browser, [`/flows/${flowName}`])
})
const apiUrl = process.env.VITE_API_URL || "http://api.localhost"
/** Write a node's source through the API; typing code is not what we test. */