Publish the dashboard the endpoint test asserts on

A dashboard edit is a draft now, and the flow canvas draws the controls the
panels actually carry, so the fixture has to publish it the same way it
already publishes the flow. The assertion is unchanged.
This commit is contained in:
2026-08-17 12:03:54 +02:00
parent a0448a6bed
commit a8909a6d3f
+12 -3
View File
@@ -58,9 +58,18 @@ test.beforeAll(async ({ browser }) => {
config: { target: `${flowName}.level` },
},
]
await api(page, `/dashboards/${dashboardName}`, {
method: "PUT",
data: dashboard,
const draft = await (
await api(page, `/dashboards/${dashboardName}`, {
method: "PUT",
data: dashboard,
})
).json()
// A dashboard edit is a draft, and the flow canvas draws the controls the
// panels actually carry — so the endpoint only exists once this is published,
// the same way the flow above had to be.
await api(page, `/dashboards/${dashboardName}/publish`, {
method: "POST",
data: { version: draft.version },
})
await page.close()
})