mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2025-03-23 21:34:32 +00:00
Use special start checking on Software.
The enhanced method of menu_launch_type does not cover for special corner cases, where the application starts in a specific mode (settings dialogues etc.) This handles exceptions for Software.
This commit is contained in:
parent
a7e7823f44
commit
7e352e429c
17
lib/utils.pm
17
lib/utils.pm
@ -6,7 +6,7 @@ use base 'Exporter';
|
||||
use Exporter;
|
||||
use lockapi;
|
||||
use testapi qw(is_serial_terminal :DEFAULT);
|
||||
our @EXPORT = qw/run_with_error_check type_safely type_very_safely desktop_vt boot_to_login_screen console_login console_switch_layout desktop_switch_layout console_loadkeys_us do_bootloader boot_decrypt check_release menu_launch_type setup_repos repo_setup get_workarounds disable_updates_repos cleanup_workaround_repo console_initial_setup handle_welcome_screen gnome_initial_setup anaconda_create_user check_desktop quit_firefox advisory_get_installed_packages acnp_handle_output advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut disable_firefox_studies select_rescue_mode copy_devcdrom_as_isofile get_release_number check_left_bar check_top_bar check_prerelease check_version spell_version_number _assert_and_click is_branched rec_log repos_mirrorlist register_application get_registered_applications desktop_launch_terminal solidify_wallpaper check_and_install_git download_testdata make_serial_writable set_update_notification_timestamp kde_doublek_workaround dm_perform_login/;
|
||||
our @EXPORT = qw/run_with_error_check type_safely type_very_safely desktop_vt boot_to_login_screen console_login console_switch_layout desktop_switch_layout console_loadkeys_us do_bootloader boot_decrypt check_release menu_launch_type setup_repos repo_setup get_workarounds disable_updates_repos cleanup_workaround_repo console_initial_setup handle_welcome_screen gnome_initial_setup anaconda_create_user check_desktop quit_firefox advisory_get_installed_packages acnp_handle_output advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut disable_firefox_studies select_rescue_mode copy_devcdrom_as_isofile get_release_number check_left_bar check_top_bar check_prerelease check_version spell_version_number _assert_and_click is_branched rec_log repos_mirrorlist register_application get_registered_applications desktop_launch_terminal solidify_wallpaper check_and_install_git download_testdata make_serial_writable set_update_notification_timestamp kde_doublek_workaround dm_perform_login check_software_start/;
|
||||
|
||||
|
||||
# We introduce this global variable to hold the list of applications that have
|
||||
@ -1862,4 +1862,19 @@ sub dm_perform_login {
|
||||
send_key "ret";
|
||||
}
|
||||
|
||||
# With Gnome Software it is a bit more complicated to check
|
||||
# that the application has started correctly, because on first
|
||||
# runs (most of the tests), it keeps asking about third party
|
||||
# repositories.
|
||||
# This subroutine handles it, so we can use it on multiple
|
||||
# places around the test cases.
|
||||
sub check_software_start {
|
||||
if (check_screen("gnome_software_ignore", 10)) {
|
||||
wait_still_screen(3);
|
||||
# match again as the dialog might have moved a bit
|
||||
assert_and_click("gnome_software_ignore");
|
||||
}
|
||||
assert_screen("desktop_package_tool_update");
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -13,12 +13,8 @@ sub run {
|
||||
|
||||
|
||||
# check if third party dialog appears, if so, click it away
|
||||
if (check_screen 'gnome_software_ignore', 10) {
|
||||
wait_still_screen 3;
|
||||
# match again as the dialog may have moved a bit
|
||||
assert_and_click 'gnome_software_ignore';
|
||||
}
|
||||
assert_screen 'desktop_package_tool_update';
|
||||
check_software_start();
|
||||
|
||||
# Register application
|
||||
register_application("gnome-software");
|
||||
# Close the application
|
||||
|
@ -45,7 +45,11 @@ sub run {
|
||||
# According to the ticket, the 'fedora.json' file
|
||||
# which lists the available versions will be created
|
||||
# after the Software starts. Let's start it then on Gnome.
|
||||
menu_launch_type("software", checkstart => 1);
|
||||
# Do not use the default start checks, because they could
|
||||
# fail, check manually instead.
|
||||
menu_launch_type("software");
|
||||
check_software_start();
|
||||
|
||||
# When Software is started for the first time, it asks whether
|
||||
# a user wants to use Third Party software. We want to Ignore
|
||||
# this and proceed, so if we see that we click on Ignore.
|
||||
|
@ -48,9 +48,16 @@ sub run {
|
||||
|
||||
# Start the package manager application depending
|
||||
# on which DE we are on.
|
||||
my $pkgmgr = "software";
|
||||
$pkgmgr = "discover" if ($desktop eq "kde");
|
||||
menu_launch_type($pkgmgr, checkstart => 1);
|
||||
if ($desktop eq "gnome") {
|
||||
# Do not do start checking through menu_launch_type as this
|
||||
# could fail on Gnome because of the third party dialogue.
|
||||
# Use the Software specific check instead.
|
||||
menu_launch_type("software");
|
||||
check_software_start();
|
||||
}
|
||||
else {
|
||||
menu_launch_type("discover", checkstart => 1);
|
||||
}
|
||||
|
||||
# On Gnome, the upgrade is safely visible when
|
||||
# we visit the Update page by clicking on the
|
||||
|
Loading…
Reference in New Issue
Block a user