From ec2a962163e06c692276017f65d5eacbdb5a6c79 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 13 Oct 2021 14:41:45 -0700 Subject: [PATCH] Handle change to tabs required in Cockpit 255 "Join a domain" In Cockpit 255 we need fewer tabs to navigate this screen. Handle both cases. Signed-off-by: Adam Williamson --- tests/realmd_join_cockpit.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/realmd_join_cockpit.pm b/tests/realmd_join_cockpit.pm index bbf061fb..cc931489 100644 --- a/tests/realmd_join_cockpit.pm +++ b/tests/realmd_join_cockpit.pm @@ -26,6 +26,7 @@ sub run { # optional as it's not really part of the test script_run "dnf -y install sssd-tools", 220; script_run "sss_debuglevel 9"; + my $cockpitver = script_output 'rpm -q cockpit --queryformat "%{VERSION}\n"'; # run firefox and login to cockpit # note: we can't use wait_screen_change, wait_still_screen or # check_type_string in cockpit because of that fucking constantly @@ -45,9 +46,14 @@ sub run { last if (check_screen "cockpit_join_domain", 30); } assert_screen "cockpit_join_domain"; - type_string("\t\t", 4); + # we need one tab to reach "Domain address" and then one tab to + # reach "Domain administrator name" on cockpit 255+... + my $tabs = "\t"; + # ...but two tabs in both places on earlier versions + $tabs = "\t\t" if ($cockpitver < 255); + type_string($tabs, 4); type_string("ipa001.test.openqa.fedoraproject.org", 4); - type_string("\t\t", 4); + type_string($tabs, 4); type_string("admin", 4); send_key "tab"; sleep 3;