1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2025-07-17 02:41:46 +00:00
os-autoinst-distri-fedora/tests/applications/papers/add_annotation.pm
Lukáš Růžička b3463c5746 Add tests for Papers to replace Evince tests.
This test suite replaces the Evince test suite and
adds altered scripts and needles to go with the
Papers applications. At the same time, it provides
the same level of functionality and testability
as the original evince test.

Fixes: https://pagure.io/fedora-qa/os-autoinst-distri-fedora/issue/377
2025-05-16 10:08:34 -07:00

59 lines
1.7 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;
# Select location to add annotation.
assert_and_click("papers_select_annotation_place", button => "right", timeout => 30);
# Add the annotation.
assert_and_click("papers_add_annotation");
wait_still_screen(2);
# Enter some text to the annotation.
type_very_safely("This is a very important annotation.");
# Check that the annotation window has appeared with that text.
assert_screen("papers_annotation_added");
# Close the annotation.
assert_and_click("papers_close_annotation");
# Check that the annotation is still placed in the document.
assert_screen("papers_annotation_placed");
# Open the annotation's context menu.
assert_and_click("papers_annotation_placed", button => "right");
# Open the Properties
assert_and_click("papers_annotation_properties");
# Change the color
assert_and_click("papers_annotation_color");
assert_and_click("papers_select_color");
assert_and_click("gnome_button_select");
assert_and_dclick("papers_opacity_hundred");
type_very_safely("70");
assert_and_click("gnome_button_apply");
assert_screen("papers_annotation_placed"); # Different opacity
# Remove the annotation.
assert_and_click("papers_annotation_placed", button => "right");
assert_and_click("papers_remove_annotation");
# Check that the annotation has been removed.
assert_screen("papers_annotation_removed");
}
sub test_flags {
# Rollback to the starting point.
return {always_rollback => 1};
}
1;