1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-25 15:23:08 +00:00
os-autoinst-distri-fedora/tests/anaconda_help.pm
Adam Williamson ea8500cf07 Various changes for webUI deferral to F40
webUI has been deferred to F40, so we need to expect the old UI
flow on F39 now. This should cover everything, I hope.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-09-12 16:13:49 -07:00

88 lines
3.2 KiB
Perl

use base "anacondatest";
use strict;
use lockapi;
use testapi;
use utils;
use anaconda;
sub run {
# This test tests that Anaconda is able to show help for particular Anaconda screens.
# It opens various Anaconda panes, clicks on Help button, and checks that correct
# Help content is shown for that pane.
#
# Although this test performs Anaconda routines and it only partly performs the installation,
# therefore it is NOT to be considered an *installation test*.
#
# This tests should run after the _boot_to_anaconda test. Which should take us to Anaconda
# main hub.
# Now, we should be on Anaconda Main hub, but the hub differs for various
# installation media. For each such media (ServerDVD, WS Live, KDE Live),
# we create a tailored test plan.
# Create test plans
my @testplan;
# For LIVE KDE:
if ((get_var('LIVE')) && (get_var('DESKTOP') eq "kde")) {
@testplan = qw/keyboard_layout time_date install_destination network_host_name root_password user_creation/;
}
# For LIVE Workstation
elsif ((get_var('LIVE')) && (get_var('DESKTOP') eq "gnome")) {
my $relnum = get_release_number;
# the webUI installer from F39+ does not really have Help in
# a traditional sense, it's planned to have contextual help
# in future which we may be able to test, but for now just
# skip it
if ($relnum > 39) {
record_soft_failure "no Help in anaconda webUI currently!";
return;
}
@testplan = qw/keyboard_layout install_destination time_date/;
}
# For Silverblue
elsif (get_var('DESKTOP') eq "gnome") {
@testplan = qw/keyboard_layout language_support install_destination time_date/;
}
# For ServerDVD
else {
@testplan = qw/keyboard_layout language_support time_date installation_source select_packages install_destination network_host_name root_password user_creation/;
}
# At first, we check for the main hub help.
check_help_on_pane("main");
# Iterate over test plan and do the tests.
foreach (@testplan) {
check_help_on_pane($_);
}
# Now, we will start the installation.
# on GNOME installs (Workstation Live and Silverblue) we don't
# need to set a root password or create a user; on other flavors
# we must
unless (get_var("DESKTOP") eq "gnome") {
assert_and_click "anaconda_install_root_password";
# we have to click 'enable root account' before typing the
# password
assert_and_click "anaconda_install_root_password_screen";
type_safely "weakadminpassword";
send_key "tab";
type_safely "weakadminpassword";
assert_and_click "anaconda_spoke_done";
}
# Begin installation after waiting out animation
assert_screen "anaconda_main_hub_begin_installation", 90;
wait_still_screen 5;
assert_and_click "anaconda_main_hub_begin_installation";
# Check the last Help screen but wait for some time for the test to settle down.
sleep 10;
check_help_on_pane("installation_progress");
# As there is no need to proceed with the installation,
# the test ends here and the VM will be destroyed
# after some short time.
}
1;