mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-11-16 02:01:25 +00:00
e0d9409c74
This PR fixes issue #188. It adds a test suite to test basic functionality of Evince and brings the following features: * test scripts for various Evince functions. * needles to support the Evince test scripts * new template variables `TESTPATH` and `POSTINSTALL_LOAD_ALL` (see below) * new logic in `main.py` (see below) The new variables and the new logic make it easier to create test suites for post-installation tests. If TESTPATH is used, OpenQA will take all tests mentioned in POSTINSTALL from that specified TESTPATH. If both TESTPATH and POSTINSTALL_LOAD_ALL are used, then OpenQA will run all tests it can find at the TESTPATH location. If POSTINSTALL and POSTINSTALL_LOAD_ALL are set simultaneously, then only POSTINSTALL will be taken into account and OpenQA will only load tests mentioned there.
49 lines
1.3 KiB
Perl
49 lines
1.3 KiB
Perl
use base "installedtest";
|
|
use strict;
|
|
use testapi;
|
|
use utils;
|
|
|
|
# This part of the suite tests an annotation can be added to the displayed content.
|
|
|
|
sub run {
|
|
my $self = shift;
|
|
|
|
# Click on the Pencil button.
|
|
assert_and_click("evince_add_annotation", button => "left", timeout => 30);
|
|
|
|
# Click on Note text.
|
|
assert_and_click("evince_add_annotation_text", button => "left", timeout => 30);
|
|
|
|
# Select location to add annotation.
|
|
assert_and_click("evince_select_annotation_place", button => "left", timeout => 30);
|
|
|
|
# Enter some text to the annotation.
|
|
type_very_safely("Add note");
|
|
|
|
# Check that the annotation window has appeared with that text.
|
|
assert_screen("evince_annotation_added");
|
|
|
|
# Close the annotation.
|
|
assert_and_click("evince_close_annotation", button => "left", timeout => 30);
|
|
|
|
# Check that the annotation is still placed in the document.
|
|
assert_screen("evince_annotation_placed");
|
|
|
|
# Open the annotation's context menu.
|
|
assert_and_click("evince_annotation_placed", button => "right", timeout => 30);
|
|
|
|
# Remove the annotation.
|
|
assert_and_click("evince_remove_annotation", button => "left", timeout => 30);
|
|
|
|
# Check that the annotation has been removed.
|
|
assert_screen("evince_annotation_removed");
|
|
|
|
}
|
|
|
|
sub test_flags {
|
|
# Rollback to the starting point.
|
|
return {always_rollback => 1};
|
|
}
|
|
|
|
1;
|