Skip to content

Commit ebc1571

Browse files
committed
test(pending): require persistent failure before the browser recovery warning
The PR CI exposed the rendered interruption-dock regression still expecting a toast after a single incomplete recovery. Under the new policy the first failure only marks recovery incomplete; the warning appears after the second consecutive failure, stays single while recovery remains incomplete, and re-arms after success. The test now asserts no notification after one failure, exactly one after two, no duplicate across invalidation, and a second warning only after a new two-failure streak following recovery. Its 14 interruption-dock browser checks pass locally.
1 parent 5077a1b commit ebc1571

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎packages/ui/tests/browser/interruption-dock.test.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,14 @@ async function fixture(width = 1100, theme: "light" | "dark" = "light") {
3838
}
3939
const answer = (page: Page) => page.locator('.interruption-dock input[type="text"]:visible')
4040

41-
test("incomplete recovery uses existing notifications once until recovery, without banners or icons, and preserves drafts", async () => {
41+
test("persistently incomplete recovery uses existing notifications once until recovery, without banners or icons, and preserves drafts", async () => {
4242
const { page, errors } = await fixture(393)
4343
try {
4444
await page.evaluate(() => (window as any).fixture.recover(false))
4545
const warning = page.getByText(/^Question and permission recovery is incomplete/)
46+
// A single transient failure is retried by the liveness pass without a warning.
47+
assert.equal(await page.evaluate(() => (window as any).fixture.notifications().length), 0)
48+
await page.evaluate(() => (window as any).fixture.recover(false))
4649
await warning.waitFor()
4750
assert.equal(await warning.count(), 1)
4851
assert.equal(await page.evaluate(() => (window as any).fixture.notifications().length), 1)
@@ -62,6 +65,8 @@ test("incomplete recovery uses existing notifications once until recovery, witho
6265
await page.evaluate(() => (window as any).fixture.recover(true))
6366
assert.equal(await warning.count(), 0)
6467
await page.evaluate(() => (window as any).fixture.recover(false))
68+
assert.equal(await page.evaluate(() => (window as any).fixture.notifications().length), 1)
69+
await page.evaluate(() => (window as any).fixture.recover(false))
6570
await warning.waitFor()
6671
assert.equal(await page.evaluate(() => (window as any).fixture.notifications().length), 2)
6772
assert.equal(await answer(page).inputValue(), "Keep this answer")

0 commit comments

Comments
 (0)