1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-09-22 23:17:21 +00:00
os-autoinst-distri-fedora/tests/desktop_upgrade_graphical.pm

98 lines
3.2 KiB
Perl
Raw Normal View History

use base "installedtest";
use strict;
use testapi;
use utils;
use packagetest;
sub run {
my $self = shift;
my $desktop = get_var('DESKTOP');
2018-06-28 12:05:56 +00:00
# this launches GNOME Software on GNOME, dunno for any other
# desktop yet
2018-06-29 09:02:04 +00:00
menu_launch_type('update');
2018-06-28 12:05:56 +00:00
# GNOME Software has a welcome screen, get rid of it if it shows
# up (but don't fail if it doesn't, we're not testing that)
if ($desktop eq 'gnome' && check_screen 'gnome_software_welcome', 10) {
send_key 'ret';
}
2018-06-29 14:55:44 +00:00
## go to the 'update' interface. For GNOME, we may be waiting
## some time at a 'Software catalog is being loaded' screen.
#if ($desktop eq 'gnome') {
# for my $n (1..5) {
# last if (check_screen 'desktop_package_tool_update', 120);
# mouse_set 10, 10;
# mouse_hide;
# }
#}
# If a banner appears that offers enablement of third party, discard it.
2018-07-12 12:55:25 +00:00
if (check_screen('desktop_package_tool_thirdparty_enable', 60)) {
assert_and_click 'desktop_package_tool_thirdparty_enable_cancel','left', 30;
}
2018-07-11 09:44:33 +00:00
wait_still_screen 2;
2018-06-29 10:35:33 +00:00
# now click on the update button
assert_and_click 'desktop_package_tool_update','left', 120;
2018-06-29 10:35:33 +00:00
wait_still_screen 2;
# a banner should inform about new version, download it
2018-07-11 11:10:58 +00:00
assert_and_click 'desktop_package_tool_download','left', 1800;
2018-06-28 13:03:01 +00:00
wait_still_screen 5;
2018-06-29 10:35:33 +00:00
# after the download, Install the updates
2018-07-11 13:00:39 +00:00
assert_and_click 'desktop_package_tool_install','left', 1800;
2018-06-28 13:03:01 +00:00
# wait for refresh, then apply updates, using a C-style loop so we
# can reset it if needed due to RHBZ #1314991
2018-06-28 13:03:01 +00:00
#for (my $n = 1; $n < 6; $n++) {
# Check if we see the 'cancelled by user action' error we get
# when #1314991 happens, if so, refresh and restart the loop
2018-06-28 11:11:46 +00:00
#sleep 100;
2018-06-28 13:03:01 +00:00
# $n = 1;
# }
# last if (assert_and_click 'desktop_package_tool_install', 120);
# mouse_set 10, 10;
# mouse_hide;
# }
# on GNOME, wait for reboots.
if ($desktop eq 'gnome') {
# handle reboot confirm screen which pops up
2018-07-10 14:44:19 +00:00
2018-07-12 13:51:07 +00:00
type_very_safely(get_var('USER_PASSWORD','weakpassword'));
assert_and_click('desktop_package_tool_authenticate','',60);
2018-07-10 14:44:19 +00:00
assert_and_click('desktop_package_tool_restart','',30);
2018-07-10 14:44:19 +00:00
boot_to_login_screen;
}
else {
# KDE will prompt for authentication if any package is not
# signed. As of 2016-09-23, puiterwijk claims Rawhide packages
# will be autosigned 'by Monday', so if this happens, we're
# going to treat it as a soft fail, indicating the update
# mechanism works, but a package that should have been signed
# was not.
assert_screen ['desktop_package_tool_update_done', 'desktop_package_tool_update_authenticate'], 180;
if (match_has_tag('desktop_package_tool_update_authenticate')) {
record_soft_failure;
type_very_safely get_var('USER_PASSWORD', 'weakpassword');
send_key 'ret';
assert_screen 'desktop_package_tool_update_done', 180;
}
}
# back to console to verify updates
$self->root_console(tty=>3);
verify_updated_packages;
}
sub test_flags {
return { fatal => 1 };
}
1;
# vim: set sw=4 et: