Skip to content

Commit

Permalink
test: navigate to the correct page directly
Browse files Browse the repository at this point in the history
Instead of logging in, loading the users page and then switching the url
to the account detail page directly browse to the detail page.
  • Loading branch information
jelly committed Sep 3, 2024
1 parent c9ddba2 commit 8d4f470
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/verify/check-users
Original file line number Diff line number Diff line change
Expand Up @@ -985,8 +985,7 @@ class TestAccounts(testlib.MachineCase):
m.execute("useradd scruffy -s /bin/bash -c Scruffy")
m.execute("echo scruffy:foobar | chpasswd")

self.login_and_go("/users")
b.go("#/scruffy")
self.login_and_go("/users#/scruffy")
b.wait_text("#account-user-name", "scruffy")

# Try to expire the account
Expand Down Expand Up @@ -1056,8 +1055,7 @@ class TestAccounts(testlib.MachineCase):

b.logout()
# HACK: https://github.com/cockpit-project/cockpit/issues/20262
self.login_and_go("/users", user="scruffy", superuser=False)
b.go("#/scruffy")
self.login_and_go("/users#/scruffy", user="scruffy", superuser=False)
b.wait_text("#account-user-name", "scruffy")
b.wait_text("#account-expiration-text", "Never expire account")
b.wait_visible("#account-expiration-button[disabled]")
Expand All @@ -1066,8 +1064,7 @@ class TestAccounts(testlib.MachineCase):

# Lastly force a password change
b.logout()
self.login_and_go("/users")
b.go("#/scruffy")
self.login_and_go("/users#/scruffy")
b.wait_text("#account-user-name", "scruffy")
b.click("#password-reset-button")
b.wait_visible("#password-reset")
Expand Down

0 comments on commit 8d4f470

Please sign in to comment.