Skip to content

Commit

Permalink
test: Robustify opening the host switcher in more places
Browse files Browse the repository at this point in the history
  • Loading branch information
mvollmer authored and martinpitt committed Dec 18, 2024
1 parent ad6998b commit 71d6efb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/verify/check-shell-multi-machine-key
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# along with Cockpit; If not, see <https://www.gnu.org/licenses/>.

import re
import time

import testlib

Expand Down Expand Up @@ -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")

Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 71d6efb

Please sign in to comment.