From 9e2d17cc2d298b088876110b4192fc1ca28b9383 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Wed, 10 Jun 2026 21:51:16 -0700 Subject: [PATCH] Tests: follow Compare chat into the More submenu in the extra UI driver (#6177) PR #6153 taught the chat UI driver to find Compare chat inside the decluttered plus menu (#6140) but the extra UI driver kept looking for the old top-level item, so all three Studio UI CI workflows have been red on main since (Compare nav not found). Mirror the same hover-then-click More fallback here. --- tests/studio/playwright_extra_ui.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/studio/playwright_extra_ui.py b/tests/studio/playwright_extra_ui.py index 20c7bda87c..26c3c244ca 100644 --- a/tests/studio/playwright_extra_ui.py +++ b/tests/studio/playwright_extra_ui.py @@ -332,6 +332,21 @@ with sync_playwright() as p: plus_btn.click(force = True) page.wait_for_timeout(400) compare_item = page.get_by_role("menuitem", name = re.compile(r"Compare chat", re.I)).first + if compare_item.count() == 0: + # Compare chat moved into the "More" submenu; hover, then click fallback. + more_trigger = page.get_by_role("menuitem", name = re.compile(r"^More$", re.I)).first + if more_trigger.count() > 0: + more_trigger.hover() + page.wait_for_timeout(400) + compare_item = page.get_by_role( + "menuitem", name = re.compile(r"Compare chat", re.I) + ).first + if compare_item.count() == 0: + more_trigger.click(force = True) + page.wait_for_timeout(400) + compare_item = page.get_by_role( + "menuitem", name = re.compile(r"Compare chat", re.I) + ).first if compare_item.count() > 0: compare_item.click(force = True) compare_opened = True