mirror of
https://github.com/andrewyng/openworker.git
synced 2026-09-11 06:30:25 +00:00
Keep Retry offered across model switches
Switch notices no longer consume the retry guard or hide the button. Error, switch model, Retry is the intended recovery path; retry runs on the new model.
This commit is contained in:
@@ -25,3 +25,25 @@ test("provider error shows a retriable notice; Retry re-runs without a new user
|
||||
// …and the button is gone now that the error notice is no longer the transcript tail.
|
||||
await expect(page.getByTestId("notice-retry")).toHaveCount(0);
|
||||
});
|
||||
|
||||
test("Retry survives a model switch — the intended recovery path", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.getByText("Draft the launch note").first().click();
|
||||
const box = page.getByPlaceholder(/Ask the coworker/);
|
||||
await box.fill("please fail the turn");
|
||||
await box.press("Enter");
|
||||
await expect(page.getByTestId("notice-retry")).toBeVisible({ timeout: 10_000 });
|
||||
|
||||
// Switch models: the info marker lands AFTER the error — Retry must stay offered
|
||||
// (owner-hit 2026-07-23: the switch notices consumed it).
|
||||
const picker = page.locator(".dd").filter({ hasText: "Claude Opus 4.8" });
|
||||
await picker.locator(".pill").click();
|
||||
await page.locator(".dd-item").filter({ hasText: "GPT-5.5" }).click();
|
||||
await expect(page.getByText(/Model switched to gpt-5.5/).first()).toBeVisible();
|
||||
const retry = page.getByTestId("notice-retry");
|
||||
await expect(retry).toBeVisible();
|
||||
|
||||
await retry.click();
|
||||
await expect(page.getByText("Recovered after retry.").first()).toBeVisible({ timeout: 10_000 });
|
||||
await expect(page.getByTestId("notice-retry")).toHaveCount(0);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user