Skip to content

Commit

Permalink
webui: add creating user to steps in progress screen test
Browse files Browse the repository at this point in the history
The test is destructive so we don't have to (and can't) do the cleanup.
  • Loading branch information
rvykydal committed Nov 2, 2023
1 parent c5d67fc commit f5cb175
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ui/webui/test/check-progress
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ class TestInstallationProgress(anacondalib.VirtInstallMachineCase):

i.open()

i.reach(i.steps.REVIEW)
# Create user on the first pass through users step
i.reach(i.steps.REVIEW, step_callbacks={i.steps.ACCOUNTS: lambda: create_user(self, cleanup=False)})
i.begin_installation()

# the warning can take longer to show up than the regular wait_in_text() timeout
Expand Down
5 changes: 3 additions & 2 deletions ui/webui/test/helpers/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def set_user_account(self, user_account, append=False, value_check=True):
self.browser.set_input_text(sel, user_account, append=append, value_check=value_check)


def create_user(test):
def create_user(test, cleanup=True):
p = Password(test.browser, CREATE_ACCOUNT_ID_PREFIX)
u = Users(test.browser, test.machine)

Expand All @@ -75,4 +75,5 @@ def create_user(test):
p.set_password_confirm(password)
u.set_user_account("tester")

test.addCleanup(u.dbus_clear_users)
if cleanup:
test.addCleanup(u.dbus_clear_users)

0 comments on commit f5cb175

Please sign in to comment.