test: More precise dropdown selector

Cockpit 315 changed the session menu from the deprecated PF Dropdown to
the new one, via cockpit-components-dropdown. `DropdownItem` now renders
the class name into *both* the `<li>` and the `<button>` inside of it,
so select the button to avoid an ambiguous selector.
This commit is contained in:
Martin Pitt 2024-04-11 10:59:52 +02:00 committed by Jelle van der Waa
parent 391301e19a
commit 095edc5f7e

View file

@ -33,7 +33,7 @@ class TestApplication(testlib.MachineCase):
b.switch_to_top() b.switch_to_top()
# the menu and dialog changed several times # the menu and dialog changed several times
b.click("#toggle-menu") b.click("#toggle-menu")
b.click(".display-language-menu") b.click("button.display-language-menu")
b.wait_popup('display-language-modal') b.wait_popup('display-language-modal')
b.click("#display-language-modal [data-value='de-de'] button") b.click("#display-language-modal [data-value='de-de'] button")
b.click("#display-language-modal button.pf-m-primary") b.click("#display-language-modal button.pf-m-primary")