Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: don't wait twice for wait_in_text #20174

Merged
merged 2 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion test/verify/check-networkmanager-basic
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ class TestNetworkingBasic(netlib.NetworkCase):
b.wait_not_present("#networking-nm-crashed")
b.wait_not_present("#networking-nm-disabled")
b.wait_visible("#networking-graphs")
b.wait_visible("#networking-interfaces")
b.wait_in_text("#networking-interfaces", iface)

def assert_stopped(enabled):
Expand Down
1 change: 0 additions & 1 deletion test/verify/check-networkmanager-firewall
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ class TestFirewall(netlib.NetworkCase):
print(identifier)
# expand-togglefreeipa-4
line_sel = f".zone-section[data-id='public'] tr[data-row-id='{identifier}']"
b.wait_visible(line_sel)
b.wait_in_text(line_sel, "".join([identifier, tcp, udp]))
if desc:
# Click expand button
Expand Down
4 changes: 0 additions & 4 deletions test/verify/check-packagekit
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,6 @@ ExecStart=/usr/local/bin/{self.packageName}
b.wait_in_text("#available-updates table", self.packageName)

# install updates
b.wait_visible("#install-all")
b.wait_in_text("#install-all", "Install all updates")
b.click("#install-all")
with b.wait_timeout(60):
Expand All @@ -487,7 +486,6 @@ ExecStart=/usr/local/bin/{self.packageName}

b.wait_visible(f"{rowId}")
b.click(f"{rowId} button")
b.wait_visible(f"{rowId} + tr")
b.wait_in_text(f"{rowId} + tr", self.packageName)

# test the tracer functionality works also in the Status Card
Expand Down Expand Up @@ -639,7 +637,6 @@ ExecStart=/usr/local/bin/{packageName}
b.wait_in_text("#available-updates table", packageName)

# install updates
b.wait_visible("#install-all")
b.wait_in_text("#install-all", "Install all updates")
b.click("#install-all")
with b.wait_timeout(60):
Expand All @@ -650,7 +647,6 @@ ExecStart=/usr/local/bin/{packageName}

b.wait_visible("#service-row")
b.click("#service-row button")
b.wait_visible("#service-row + tr")
b.wait_in_text("#service-row + tr", packageName)

# update required a service restart
Expand Down
2 changes: 0 additions & 2 deletions test/verify/check-static-login
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,10 @@ account required pam_succeed_if.so user ingroup %s""" % m.get_admin_group

def assert_messages(has_last, n_fail):
if has_last:
b.wait_visible('#system_last_login')
b.wait_in_text('#system_last_login', "Last successful login")
b.wait_in_text('#system_last_login_from', "from") # only present if IP was logged

if n_fail:
b.wait_visible('#system_last_login')
b.wait_in_text('#system_last_login', f'{n_fail} failed login')
b.wait_in_text('#system_last_login_from', "from")
b.wait_in_text('#system_last_login_success', "Last successful login")
Expand Down
5 changes: 0 additions & 5 deletions test/verify/check-storage-luks
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,6 @@ class TestStorageLuksDestructive(storagelib.StorageCase):
self.assertIn(b.text("h4.pf-v5-c-alert__title:not(span)").split("Danger alert:", 1).pop(), error_messages)
self.dialog_cancel()
# change one of the passphrases
b.wait_visible(slots_list + "li:last-child [aria-label='Edit']")
b.click(slots_list + "li:last-child [aria-label='Edit']")
self.dialog_wait_open()
self.dialog_wait_apply_enabled()
Expand Down Expand Up @@ -510,7 +509,6 @@ class TestStorageNBDE(storagelib.StorageCase, packagelib.PackageCase):

b.wait_in_text(self.card_desc("Encryption", "Options"), "nofail")
panel = "#encryption-keys "
b.wait_visible(panel)
b.wait_in_text(panel + "ul li:nth-child(1)", "Passphrase")

# Add a key
Expand All @@ -534,7 +532,6 @@ class TestStorageNBDE(storagelib.StorageCase, packagelib.PackageCase):
self.dialog_set_val("passphrase", "vainu-reku-toma-rolle-kaja")
self.dialog_apply()
self.dialog_wait_close()
b.wait_visible(panel + "ul li:nth-child(2)")
b.wait_in_text(panel + "ul li:nth-child(2)", "10.111.112.5")

# Adding the key should add "_netdev" options
Expand Down Expand Up @@ -619,7 +616,6 @@ class TestStorageNBDE(storagelib.StorageCase, packagelib.PackageCase):

self.dialog_wait_close()

b.wait_visible(panel + "ul li:nth-child(3)")
b.wait_in_text(panel + "ul li:nth-child(3)", "http://10.111.112.5")

# This should bring the options back.
Expand Down Expand Up @@ -674,7 +670,6 @@ class TestStorageNBDE(storagelib.StorageCase, packagelib.PackageCase):
self.click_card_row("Storage", location="root")

panel = "#encryption-keys "
b.wait_visible(panel)
b.wait_in_text(panel + "ul li:nth-child(1)", "Passphrase")

with b.wait_timeout(360):
Expand Down
2 changes: 0 additions & 2 deletions test/verify/check-superuser
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,6 @@ class TestSuperuserOldWebserver(testlib.MachineCase):
b.set_val("#server-field", "10.111.113.2")
b.click('#login-button')
b.wait_in_text("#server-name", "10.111.113.2")
b.wait_visible("#conversation-group")
b.wait_in_text("#conversation-prompt", "Fingerprint")
b.wait_in_text("#conversation-message", "Do you want to proceed this time?")
b.click('#login-button')
Expand Down Expand Up @@ -525,7 +524,6 @@ class TestSuperuserOldWebserver(testlib.MachineCase):
b.set_val("#server-field", "10.111.113.2")
b.click('#login-button')
b.wait_in_text("#server-name", "10.111.113.2")
b.wait_visible("#conversation-group")
b.wait_in_text("#conversation-prompt", "Fingerprint")
b.wait_in_text("#conversation-message", "Do you want to proceed this time?")
b.click('#login-button')
Expand Down
7 changes: 0 additions & 7 deletions test/verify/check-users
Original file line number Diff line number Diff line change
Expand Up @@ -426,10 +426,8 @@ class TestAccounts(testlib.MachineCase):
b.set_input_text('#accounts-create-password-pw2', "bar")
b.wait_not_present("#accounts-create-password-pw2-helper")
b.set_input_text('#accounts-create-password-pw2', "foobarfoo")
b.wait_visible("#accounts-create-password-pw2-helper")
b.wait_in_text("#accounts-create-password-pw2-helper", "The passwords do not match")
b.set_input_text('#accounts-create-password-pw2', "bar")
b.wait_visible("#accounts-create-password-pw2-helper")
b.wait_in_text("#accounts-create-password-pw2-helper", "The passwords do not match")
b.set_input_text('#accounts-create-password-pw2', "foobar")
b.wait_not_present("#accounts-create-password-pw2-helper")
Expand All @@ -453,13 +451,10 @@ class TestAccounts(testlib.MachineCase):
b.set_input_text('#accounts-create-password-pw2', "bar")
b.wait_not_present("#accounts-create-password-pw2-helper")
b.click('#accounts-create-dialog button.apply')
b.wait_visible("#accounts-create-password-pw2-helper")
b.wait_in_text("#accounts-create-password-pw2-helper", "The passwords do not match")
b.set_input_text('#accounts-create-password-pw2', "barfoo")
b.wait_visible("#accounts-create-password-pw2-helper")
b.wait_in_text("#accounts-create-password-pw2-helper", "The passwords do not match")
b.set_input_text('#accounts-create-password-pw2', "foobarfoo")
b.wait_visible("#accounts-create-password-pw2-helper")
b.wait_in_text("#accounts-create-password-pw2-helper", "The passwords do not match")
b.set_input_text('#accounts-create-password-pw2', "foobar")
b.wait_not_present("#accounts-create-password-pw2-helper")
Expand Down Expand Up @@ -1137,7 +1132,6 @@ class TestAccounts(testlib.MachineCase):
b.wait_text("#group-confirm-delete-dialog footer .pf-v5-c-button.apply", "Delete")
b.click("#group-confirm-delete-dialog footer .pf-v5-c-button.apply")
b.wait_not_present('#group-confirm-delete-dialog')
b.wait_visible("#groups-list")
b.wait_not_in_text('#groups-list', "testgroup0")

# Add testgroup0 back
Expand All @@ -1150,7 +1144,6 @@ class TestAccounts(testlib.MachineCase):
b.click("#group-confirm-delete-dialog footer .pf-v5-c-button.apply")
b.wait_not_present('#account-confirm-delete-dialog')
b.wait(lambda: "#/" == b.eval_js('window.location.hash'))
b.wait_visible("#groups-list")
b.wait_not_in_text('#groups-list', "anton")

b.click('#accounts-list td[data-label="Username"] a[href="#/admin"]')
Expand Down