2022-06-17 08:01:31 +00:00
|
|
|
use base "installedtest";
|
|
|
|
use strict;
|
|
|
|
use testapi;
|
|
|
|
use utils;
|
|
|
|
|
|
|
|
# This script will start the Gnome Clocks application and save the status
|
|
|
|
# for any subsequent tests.
|
|
|
|
|
|
|
|
sub run {
|
|
|
|
my $self = shift;
|
|
|
|
|
|
|
|
# At first, we need to set time and time zones manually.
|
|
|
|
$self->root_console(tty=>3);
|
|
|
|
# Switch off automatic time.
|
|
|
|
assert_script_run("timedatectl set-ntp 0");
|
|
|
|
# Set the time zone
|
|
|
|
assert_script_run("timedatectl set-timezone Europe/Prague");
|
|
|
|
# Set the time and date
|
|
|
|
assert_script_run("timedatectl set-time '2022-09-09 09:00:00'");
|
|
|
|
# Return back
|
|
|
|
desktop_vt();
|
|
|
|
|
|
|
|
# Start the Application
|
|
|
|
menu_launch_type("clocks");
|
2022-07-07 21:28:59 +00:00
|
|
|
assert_screen ["apps_run_clocks", "grant_access"];
|
2022-06-30 20:56:29 +00:00
|
|
|
# give access rights if asked
|
2022-07-07 21:28:59 +00:00
|
|
|
if (match_has_tag 'grant_access') {
|
2022-06-30 20:56:29 +00:00
|
|
|
click_lastmatch;
|
|
|
|
assert_screen 'apps_run_clocks';
|
|
|
|
}
|
|
|
|
|
2022-06-17 08:01:31 +00:00
|
|
|
# Make it fill the entire window.
|
|
|
|
send_key("super-up");
|
|
|
|
wait_still_screen(2);
|
|
|
|
}
|
|
|
|
|
|
|
|
sub test_flags {
|
|
|
|
# If this test fails, there is no need to continue.
|
|
|
|
return {fatal => 1, milestone => 1};
|
|
|
|
}
|
|
|
|
|
|
|
|
1;
|
|
|
|
|
|
|
|
# vim: set sw=4 et:
|