Skip to content

Commit

Permalink
tests: Reduce dependency on #host-toggle
Browse files Browse the repository at this point in the history
`#hosts-sel` will stay for showing the current user/host, but the toggle
will go away by default when we deprecate the host switcher.

The only remaining reference to it is in `testKeyboardNavigation` now,
which is intrinsically necessary. That test will have to be adjusted
when we actually disable the host switcher.
  • Loading branch information
martinpitt authored and jelly committed Jul 15, 2024
1 parent 133099d commit 497c699
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/verify/check-client
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Command = /usr/bin/env python3 -m cockpit.beiboot
def check_login(self, expected_user):
b = self.browser
b.wait_visible('#content')
b.wait_in_text("#host-toggle", expected_user)
b.wait_in_text("#hosts-sel", expected_user)
b.enter_page("/system")
if self.is_devel_build():
b.wait_visible("#system_information_hostname_text")
Expand Down
6 changes: 3 additions & 3 deletions test/verify/check-shell-menu
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class TestMenu(testlib.MachineCase):
self.login_and_go()

# initially shows host switcher
b.wait_visible("#host-toggle")
b.wait_visible("#hosts-sel")
self.assertEqual(b.eval_js("document.activeElement.tagName"), "BODY")
# conceptually we want that, but we use CSS hacks (-999 offset and 1x1 size) to hide it
# b.wait_not_visible(".skiplink")
Expand All @@ -180,7 +180,7 @@ class TestMenu(testlib.MachineCase):

# reset
b.reload()
b.wait_visible("#host-toggle")
b.wait_visible("#hosts-sel")

# press Tab twice → "Skip main navigation" skiplink
b.key("Tab")
Expand All @@ -202,7 +202,7 @@ class TestMenu(testlib.MachineCase):

# reset
b.reload()
b.wait_visible("#host-toggle")
b.wait_visible("#hosts-sel")

# without skip links, tabbing goes through page menu
b.key("Tab", repeat=5)
Expand Down

0 comments on commit 497c699

Please sign in to comment.