1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-09-16 04:57:23 +00:00
os-autoinst-distri-fedora/tests/anaconda_help.pm
Lukáš Růžička c6d443a20f Automate the QA:Testcase_Anaconda_help.
This PR automates the mentioned testcase to test that Help can be
displayed in Anaconda during the installation. It navigates through
the available Help screens and if it can see it, it finishes.

This test runs after `install_default_upload` to override the
installation defaults defined for all primary tests.

Delete a duplicated needle.

Reformat list extensions to make it nicer.

Get rid of wrong export and an empty line.

Delete empty line.

Use _boot_to_anaconda for booting and move subroutine accordingly.

Add variable to templates.fif.json

Delete trailing whitespace.

Fix calling the pretest.

Move help checking to another place.
2021-05-27 21:39:26 +00:00

73 lines
2.6 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.
#
# At first, we check for the main hub help.
check_help_on_pane("main");
# 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 create_user/;
}
# For LIVE Workstation
elsif ((get_var('LIVE')) && (get_var('DESKTOP') eq "gnome")) {
@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 create_user/;
}
# Iterate over test plan and do the tests.
foreach (@testplan) {
check_help_on_pane($_);
}
# Now, we will start the installation.
# As we have not created any root password, or any user, on non-live systems
# the Begin Installation button may be greyed out. If this is the situation,
# we will create the root password to override this.
unless (check_screen "anaconda_main_hub_begin_installation", 120) {
assert_and_click "anaconda_main_hub_root_password";
type_safely "weakrootpassword";
send_key "tab";
type_safely "weakrootpassword";
assert_and_click "anaconda_spoke_done";
}
# Begin installation
assert_and_click "anaconda_main_hub_begin_installation";
# Check the last Help screen. As
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;