From f345b54a5307b074c4928be13e096255ec547019 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Wed, 4 Nov 2026 19:41:48 +0000 Subject: [PATCH] test(addons): expect the stale banner in the apps polling spec The list stays on screen with a banner when a refresh fails. The banner text changed from "may be out of date" to "Showing the last known state.", so the polling spec waited for text that is no longer shown. Assert the banner by its test id, as the busy-owner spec does. Assisted-by: Claude:claude-sonnet-5-5 --- core/http/react-ui/e2e/addons-gallery.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/http/react-ui/e2e/addons-gallery.spec.js b/core/http/react-ui/e2e/addons-gallery.spec.js index 2d86e423dd..82eb73e4a0 100644 --- a/core/http/react-ui/e2e/addons-gallery.spec.js +++ b/core/http/react-ui/e2e/addons-gallery.spec.js @@ -243,14 +243,14 @@ test.describe('Add-ons: apps', () => { await page.clock.runFor(200) await expect.poll(() => state.log.appsList).toBe(2) // The failure doubles the wait, and the old list stays visible and flagged. - await expect(page.getByText('may be out of date')).toBeVisible() + await expect(page.getByTestId('addons-stale')).toBeVisible() await page.clock.runFor(9_000) expect(state.log.appsList).toBe(2) await page.clock.runFor(1_500) await expect.poll(() => state.log.appsList).toBe(3) await page.clock.runFor(21_000) await expect.poll(() => state.log.appsList).toBe(4) - await expect(page.getByText('may be out of date')).toHaveCount(0) + await expect(page.getByTestId('addons-stale')).toHaveCount(0) // Leave for a route without a mounted add-on consumer (Home keeps commands current). await page.evaluate(() => { window.history.pushState({}, '', '/app/polling-left'); window.dispatchEvent(new PopStateEvent('popstate')) }) // The route loads lazily and the page clock is paused: let the transition