From 54a1562154c6419cb6b33c7c3c4ecafe7a0e92f0 Mon Sep 17 00:00:00 2001 From: Dragonzz <82201310+Dragonzz27@users.noreply.github.com> Date: Sat, 19 Sep 2026 14:06:24 +0800 Subject: [PATCH] fix(ui): wait for schedule deletion redirect in live test Signed-off-by: Dragonzz <82201310+Dragonzz27@users.noreply.github.com> --- ui/playwright/live/schedules.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/playwright/live/schedules.spec.ts b/ui/playwright/live/schedules.spec.ts index 528065720..c9e8990f0 100644 --- a/ui/playwright/live/schedules.spec.ts +++ b/ui/playwright/live/schedules.spec.ts @@ -63,9 +63,9 @@ test("live: schedule configuration persists through the browser and controller", await page.goto(detailURL); await page.getByRole("button", { name: `Delete schedule ${name}`, exact: true }).click(); await page.getByRole("dialog").getByRole("button", { name: "Delete", exact: true }).click(); - await expect(page.getByText("This schedule was deleted. Its execution history is retained.")).toBeVisible(); - await expect(page.getByRole("button", { name: "Run", exact: true })).toBeDisabled(); - await page.getByRole("link", { name: "Back", exact: true }).click(); + // Deleting leaves the detail page; its retained-history controls are no + // longer mounted. Wait for navigation before checking the list. + await expect(page).toHaveURL(/\/schedules(?:\?.*)?$/); await expect(page.getByRole("link", { name, exact: true })).toHaveCount(0); } }