From 71d6efbe8376863ac43bb804796ea36ed4d4fb1c Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Wed, 18 Dec 2024 10:48:57 +0200 Subject: [PATCH] test: Robustify opening the host switcher in more places --- test/verify/check-shell-multi-machine-key | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/verify/check-shell-multi-machine-key b/test/verify/check-shell-multi-machine-key index b8ece3df37a0..f25212b2ee0b 100755 --- a/test/verify/check-shell-multi-machine-key +++ b/test/verify/check-shell-multi-machine-key @@ -18,6 +18,7 @@ # along with Cockpit; If not, see . import re +import time import testlib @@ -192,6 +193,9 @@ class TestMultiMachineKeyAuth(testlib.MachineCase): m2.execute("rm /home/admin/.ssh/authorized_keys") b.click("#hosts-sel button") + # the opening animation takes quite long, don't move elements underneath mouse clicks + b.wait_js_cond('ph_count_animations("#nav-hosts") == 0') + time.sleep(0.2) b.click("button:contains('Edit hosts')") b.click("#nav-hosts .nav-item a[href='/@10.111.113.2'] + span button.nav-action.pf-m-secondary") @@ -248,6 +252,9 @@ Host 10.111.113.2 self.load_key('id_rsa', 'foobar') b.click("#hosts-sel button") + # the opening animation takes quite long, don't move elements underneath mouse clicks + b.wait_js_cond('ph_count_animations("#nav-hosts") == 0') + time.sleep(0.2) b.click("button:contains('Add new host')") b.wait_visible('#hosts_setup_server_dialog') b.set_input_text('#add-machine-address', "10.111.113.2") @@ -284,6 +291,9 @@ Host 10.111.113.2 b.switch_to_top() b.click("#hosts-sel button") + # the opening animation takes quite long, don't move elements underneath mouse clicks + b.wait_js_cond('ph_count_animations("#nav-hosts") == 0') + time.sleep(0.2) b.click("button:contains('Add new host')") b.wait_visible('#hosts_setup_server_dialog') b.set_input_text("#add-machine-address", "10.111.113.2")