From 6ea6bc4125e0ac6c2722948abd2f5937bffe0236 Mon Sep 17 00:00:00 2001 From: Badcuban <108198679+badcuban@users.noreply.github.com> Date: Sat, 14 Nov 2026 11:28:12 -0500 Subject: [PATCH] test(web): the agent update notice test no longer waits on a closed notice's fade "brings a failure back after its notice was closed mid-run" closed the notice and waited, on the 1 s default, for it to leave the page. A closed notice stays for its 0.5 s fade (about 560 ms here), so a slow fade on a busy runner failed the test with `expected ['Updating Codex'] to deeply equal []`, as it did once in #912's CI. The titles the test reads now leave out a notice from the moment it starts closing. --- .../src/components/ProviderUpdateProgress.browser.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/ProviderUpdateProgress.browser.tsx b/apps/web/src/components/ProviderUpdateProgress.browser.tsx index b65eeadbd..ede7570e5 100644 --- a/apps/web/src/components/ProviderUpdateProgress.browser.tsx +++ b/apps/web/src/components/ProviderUpdateProgress.browser.tsx @@ -115,8 +115,15 @@ async function mountProgress() { ); } +/** + * The titles of the notices on screen. A closed one stays in the page for the + * half second it takes to fade out, and longer on a busy machine: it stops + * counting the moment it starts leaving, so no check here waits on that fade. + */ const noticeTitles = () => - Array.from(document.querySelectorAll("[data-slot='toast-title']"), (el) => el.textContent); + Array.from(document.querySelectorAll("[data-slot='toast-title']")) + .filter((title) => title.closest("[data-ending-style]") === null) + .map((title) => title.textContent); describe("ProviderUpdateProgress", () => { afterEach(async () => {