os-autoinst-distri-fedora/tests/applications/okular/aaa_setup.pm

50 lines
1.2 KiB
Perl

use base "installedtest";
use strict;
use testapi;
use utils;
# This script will download the test data for Okular, start the application,
# and set a milestone as a starting point for the other Okular tests.
#
sub run {
my $self = shift;
# Switch to console
$self->root_console(tty => 3);
# Perform git test
check_and_install_git();
# Download the test data
download_testdata();
# Exit the terminal
desktop_vt;
# Start the application
menu_launch_type("okular");
# Check that is started
assert_screen 'okular_runs';
# Open the test file to create a starting point for the other Okular tests.
# Click on Open button to open the File Open Dialog
assert_and_click("okular_open_file_dialog", button => "left", timeout => 30);
# Select the evince.pdf file.
assert_and_click("okular_file_select_pdf", button => "left", timeout => 30);
# Click the Open button to open the file
assert_and_click("kde_button_open", button => "left", timeout => 30);
# Fullsize the Evince window.
send_key("super-pgup");
# Check that the file has been successfully opened.
assert_screen("okular_file_opened");
}
sub test_flags {
return {fatal => 1, milestone => 1};
}
1;
# vim: set sw=4 et: