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;