1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-12-22 02:13:08 +00:00

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 <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2021-10-13 14:41:45 -07:00
parent 4e705d514e
commit ec2a962163

View File

@ -26,6 +26,7 @@ sub run {
# optional as it's not really part of the test # optional as it's not really part of the test
script_run "dnf -y install sssd-tools", 220; script_run "dnf -y install sssd-tools", 220;
script_run "sss_debuglevel 9"; script_run "sss_debuglevel 9";
my $cockpitver = script_output 'rpm -q cockpit --queryformat "%{VERSION}\n"';
# run firefox and login to cockpit # run firefox and login to cockpit
# note: we can't use wait_screen_change, wait_still_screen or # note: we can't use wait_screen_change, wait_still_screen or
# check_type_string in cockpit because of that fucking constantly # check_type_string in cockpit because of that fucking constantly
@ -45,9 +46,14 @@ sub run {
last if (check_screen "cockpit_join_domain", 30); last if (check_screen "cockpit_join_domain", 30);
} }
assert_screen "cockpit_join_domain"; 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("ipa001.test.openqa.fedoraproject.org", 4);
type_string("\t\t", 4); type_string($tabs, 4);
type_string("admin", 4); type_string("admin", 4);
send_key "tab"; send_key "tab";
sleep 3; sleep 3;