1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-14 02:34:21 +00:00
os-autoinst-distri-fedora/tests/applications/maps/aaa_setup.pm

67 lines
1.8 KiB
Perl
Raw Normal View History

2022-09-27 17:54:40 +00:00
use base "installedtest";
use strict;
use testapi;
use utils;
# This will set up the environment for the Maps test.
# We only need to start Maps, make it full screen and
# save the status.
sub run {
my $self = shift;
# Set the update notification timestamp
set_update_notification_timestamp();
2022-09-27 17:54:40 +00:00
# Start the application
menu_launch_type("Maps");
# Check it has started, or we got the permission prompt
assert_screen ['apps_run_maps', 'grant_access'];
# sometimes we match apps_run_maps for a split second before
# grant_access appears, so handle that
wait_still_screen 3;
assert_screen ['apps_run_maps', 'grant_access'];
2022-09-27 17:54:40 +00:00
if (match_has_tag 'grant_access') {
click_lastmatch;
assert_screen 'apps_run_maps';
}
# Fullsize the window.
send_key("super-up");
# Find a location on the map.
# If the Delete button is visible, click on it to delete the search bar
# and start a new search. If it is not visible, then press Ctrl-F
# to start the first search.
if (check_screen("maps_button_delete_bar")) {
click_lastmatch();
}
else {
send_key("ctrl-f");
}
sleep(1);
# Type in the first location
type_very_safely("brno");
# Wait a little bit for the window to settle.
wait_still_screen(2);
# Click on the location
assert_and_click("maps_select_brno");
# Let's not do any checks (they are done elsewhere),
# just let the screen settle and hit Esc to remove
# the infobox.
wait_still_screen(5);
# Dismis the info box (empty or full)
send_key("esc");
# Check that Map is shown with the correct location
assert_screen("maps_found_brno", timeout => 90);
# wait a bit to settle before snapshotting
sleep 10;
2022-09-27 17:54:40 +00:00
}
sub test_flags {
return {fatal => 1, milestone => 1};
}
1;
# vim: set sw=4 et: