From 3a9fc34fcf4aa62a77fa3183bb00e5fa345ac60e Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Mon, 22 Jun 2026 08:27:18 -0700 Subject: [PATCH] Studio Playwright: snooze update banner before sending (#6576) * Studio Playwright: snooze update banner before sending The llama.cpp update banner is a fixed bottom-right toast (z-9998). When an update is available it overlaps the composer's Send button and its subtree intercepts the click, so send_and_wait times out (flaky; surfaces on the Windows studio UI smoke, passes otherwise). Snooze the banner if it is showing before each send, then wait for it to detach. * Also snooze the web update banner before sending The web update banner (web-update-banner, z-9999) is a fixed bottom-right toast like the llama.cpp one and can overlap the Send button too. Loop over both banners and snooze whichever is showing. --- tests/studio/playwright_chat_ui.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/studio/playwright_chat_ui.py b/tests/studio/playwright_chat_ui.py index 54e9ca2f46..f9147054ee 100644 --- a/tests/studio/playwright_chat_ui.py +++ b/tests/studio/playwright_chat_ui.py @@ -569,6 +569,21 @@ with sync_playwright() as p: # this at temp 0), and the old non-empty predicate got stuck # on such bubbles. bubbles_before = _bubble_count() + # The llama.cpp and web update banners are fixed bottom-right toasts + # (z-9998 / z-9999) that can overlap the composer's Send button and + # intercept the click. Snooze whichever is showing before sending. + for prefix in ("llama", "web"): + snooze_btn = page.locator(f'[data-testid="{prefix}-update-snooze-button"]') + if snooze_btn.count(): + try: + snooze_btn.first.click(timeout = 2_000) + page.wait_for_selector( + f'[data-testid="{prefix}-update-banner"]', + state = "detached", + timeout = 5_000, + ) + except Exception: + pass composer.click() composer.fill(prompt) page.locator('button[aria-label="Send message"]').click()