-
Notifications
You must be signed in to change notification settings - Fork 779
fix(ui): wait for schedule deletion redirect in live test #2879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Level: 🔴 High · Blocking This assertion cannot fail, and after the edit it is the only thing standing between a working delete and a leaked schedule. There is no DOM state that separates "loading" from "empty" here — against const listRead = page.waitForResponse((r) => r.url().includes("ScheduledRunService/ListScheduledRuns"));
await page.getByRole("dialog").getByRole("button", { name: "Delete", exact: true }).click();
await expect(page).toHaveURL(/\/schedules(?:\?.*)?$/);
await listRead;
await expect(page.getByTestId(`schedule-link-${name}`)).toHaveCount(0);The list polls every 10s ( 🤖 written by Claude |
||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit]
Level: 🟡 Low · Not Blocking
Only the alert is about retained history —
Runis the page's primary action, disabled because the schedule is gone (src/pages/ScheduledRunsPage.tsx:113,167) — and the second sentence restates the line under it.🤖 written by Claude