1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-29 00:53:09 +00:00
os-autoinst-distri-fedora/tests/applications/okular/add_annotation.pm

62 lines
1.7 KiB
Perl
Raw Normal View History

2024-04-02 10:03:53 +00:00
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;
# Press the F6 button to open the annotation menu.
send_key("f6");
wait_still_screen(2);
# Click on Note text.
assert_and_click("okular_add_popup", button => "left", timeout => 30);
# Select location to add annotation.
assert_and_click("okular_select_annotation_place", button => "left", timeout => 30);
# Enter some text to the annotation.
type_very_safely("This is an impotant note.");
# Check that the annotation window has appeared with that text.
assert_screen("okular_annotation_added");
# Close the annotation window
send_key("esc");
# Close the annotation mode.
assert_and_click("okular_close_annotation", button => "left", timeout => 30);
# Check that the annotation is still placed in the document.
assert_screen("okular_annotation_placed");
# Reopen the annotation.
assert_and_dclick("okular_annotation_placed", button => "left", timeout => 30);
# Check that the annotation still has that text.
assert_screen("okular_annotation_added");
# Close the window again
send_key("esc");
# Open the annotation's context menu.
assert_and_click("okular_annotation_placed", button => "right", timeout => 30);
# Remove the annotation.
assert_and_click("okular_remove_annotation", button => "left", timeout => 30);
# Check that the annotation has been removed.
assert_screen("okular_annotation_removed");
}
sub test_flags {
# Rollback to the starting point.
return {always_rollback => 1};
}
1;