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.
This commit is contained in:
parent
bf2cd745b1
commit
9e2d17cc2d
1 changed files with 15 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue