test(e2e): smoke covers pinned_output persistence + pin icon

This commit is contained in:
Claude
2026-08-30 14:48:20 +00:00
parent afba598821
commit 6a820bb7fa

View File

@@ -43,4 +43,18 @@ test("login → create workflow → drop node → edit in dialog → save → re
await expect(page.locator(".react-flow__node")).toHaveCount(1);
// The canvas should show the custom label on the node.
await expect(page.locator(".react-flow__node")).toContainText("Custom smoke node");
// Pin some data on the node. The dropped tile is "Webhook" (Trigger) →
// the dialog exposes "Pinned output".
await page.locator(".react-flow__node").first().dblclick();
const pinField = page.getByLabel("Pinned output");
await pinField.fill(`{"pinned":true}`);
await page.getByRole("button", { name: /^done$/i }).click();
await page.getByRole("button", { name: /save/i }).click();
// Reload again, open the dialog, confirm the pin persisted AND the pin icon shows.
await page.reload();
await expect(page.locator('[data-testid="pin-badge"]')).toBeVisible();
await page.locator(".react-flow__node").first().dblclick();
await expect(page.getByLabel("Pinned output")).toHaveValue(/pinned/);
});