mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-12-01 17:53:08 +00:00
53 lines
1.5 KiB
Perl
53 lines
1.5 KiB
Perl
use base "installedtest";
|
|
use strict;
|
|
use testapi;
|
|
use utils;
|
|
use desktoptools;
|
|
|
|
# This script checks that automatic updates can be switched on.
|
|
|
|
sub run {
|
|
my $self = shift;
|
|
|
|
# Sometimes, Software crashes after the VM has been rolled back.
|
|
# If so, restart the application.
|
|
unless (check_screen("apps_run_software")) {
|
|
restart_application("software");
|
|
}
|
|
|
|
|
|
# Open the menu
|
|
assert_and_click("gnome_burger_menu");
|
|
wait_still_screen(2);
|
|
|
|
# Open the Update selections information
|
|
assert_and_click("software_update_preferences");
|
|
wait_still_screen(2);
|
|
|
|
# Disable automatic updates and check that the status changes
|
|
assert_and_click("software_automatic_updates");
|
|
assert_screen("software_automatic_disabled");
|
|
|
|
# Disable updates notifications and check that the status changes
|
|
assert_and_click("software_update_notifications");
|
|
assert_screen("software_notifications_disabled");
|
|
|
|
# Switch to console to run background checks, too.
|
|
send_key("ctrl-alt-f3");
|
|
sleep 5;
|
|
console_login(user => "test", password => get_var("USER_PASSWORD") || "weakpassword");
|
|
# Check that the settings above was switched off.
|
|
validate_script_output("gsettings get org.gnome.software download-updates", sub { m/false/ });
|
|
validate_script_output("gsettings get org.gnome.software download-updates-notify", sub { m/false/ });
|
|
|
|
}
|
|
|
|
sub test_flags {
|
|
# When finished, rollback to milestone.
|
|
return {always_rollback => 1};
|
|
}
|
|
|
|
1;
|
|
|
|
# vim: set sw=4 et:
|