Save progress

This commit is contained in:
Lukáš Růžička 2024-04-02 14:21:00 +02:00
parent 6fd3ff3210
commit 20430f8b99
7 changed files with 58 additions and 47 deletions

View File

@ -9,11 +9,13 @@ sub run {
my $self = shift;
# Click on zoom menu to open choices.
# Click on zoom menu and select the content.
assert_and_click("okular_change_zoom", button => "left", timeout => 30);
send_key("ctrl-a");
# Select 200%.
assert_and_click("okular_select_zoom_200", button => "left", timeout => 30);
type_very_safely("200");
send_key("ret");
# Check that the document zoom was changed.
assert_screen("okular_document_zoom_200");

View File

@ -8,11 +8,13 @@ use utils;
sub run {
my $self = shift;
# Click on the Zoom menu to change a different zoom for next steps.
# Click on the Zoom menu and change a different zoom for next steps.
assert_and_click("okular_change_zoom", button => "left", timeout => 30);
send_key("ctrl-a");
# Select the Fit Width option to be able to see the whole layout.
assert_and_click("okular_select_zoom_fitwidth", button => "left", timeout => 30);
type_very_safely("fit width");
send_key("ret");
# Enter the menu
assert_and_click("okular_view_mode", button => "left", timeout => 30);

View File

@ -8,16 +8,12 @@ use utils;
sub run {
my $self = shift;
# Open menu with Burger icon.
assert_and_click("gnome_burger_menu", button => "left", timeout => 30);
wait_still_screen 2;
# Select the Help item in the menu.
assert_and_click("evince_menu_help", button => "left", timeout => 30);
# Open Help.
send_key("f1");
wait_still_screen 2;
# Check that Help has been shown.
assert_screen("evince_help_shown", timeout => 30);
assert_screen("okular_help_shown", timeout => 30);
}
sub test_flags {

View File

@ -1,30 +0,0 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# This part of the suite tests that Evince can be switched into night mode.
sub run {
my $self = shift;
# Click on the Menu button.
assert_and_click("gnome_burger_menu", timeout => 30, button => "left");
# Click on the Night mode to select it.
assert_and_click("evince_toggle_night_mode", button => "left", timeout => 30);
# The menu stays opened, so hit Esc to dismiss it.
send_key("esc");
wait_still_screen 2;
# Check that night mode has been activated.
assert_screen("evince_night_mode", timeout => 30);
}
sub test_flags {
return {always_rollback => 1};
}
1;

View File

@ -0,0 +1,39 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# This part of the suite tests that Evince can be switched into night mode.
sub run {
my $self = shift;
# Switch on Presentation mode.
send_key("ctrl-shift-p");
wait_still_screen(2);
# A dialogue should be shown, assert and dismiss.
assert_screen("okular_presentation_dialogue");
assert_and_click("okular_presentation_ok");
# Make sure that we are on the first page.
send_key("home");
# Each time, we move to a different page, a special
# navigation mark will be shown for a couple of seconds,
# so we check for it.
send_key("right"); # to move to a different page
assert_screen("okular_navi_page_one");
# Move to another page to see if presentation mode
# works correctly.
send_key("left"); # to move to a second page
assert_screen("okular_navi_page_two");
}
sub test_flags {
return {always_rollback => 1};
}
1;

View File

@ -9,15 +9,15 @@ sub run {
my $self = shift;
# Open the menu.
assert_and_click("gnome_burger_menu", button => "left", timeout => 30);
assert_and_click("kde_mainmenu_file", button => "left", timeout => 30);
wait_still_screen 2;
# Select the Properties item.
assert_and_click("evince_menu_properties", button => "left", timeout => 30);
assert_and_click("okular_menu_properties", button => "left", timeout => 30);
wait_still_screen 2;
# Check that Properties are shown.
assert_screen("evince_properties_shown", timeout => 30);
assert_screen("okular_properties_shown", timeout => 30);
}
sub test_flags {

View File

@ -8,7 +8,9 @@ use utils;
sub rotate_content {
# Send the key combo to rotate the content
send_key("ctrl-right");
assert_and_click("okular_menu_view");
assert_and_click("okular_submenu_orientation");
assert_and_click("okular_submenu_rotate");
}
sub run {
@ -18,13 +20,13 @@ sub run {
rotate_content();
# Check that the window content has been rotated.
assert_screen("evince_content_rotated_once", timeout => 30);
assert_screen("okular_content_rotated_once", timeout => 30);
# Rotate the content again.
rotate_content();
# Check that the window content has been rotated.
assert_screen("evince_content_rotated_twice", timeout => 30);
assert_screen("okular_content_rotated_twice", timeout => 30);
}
sub test_flags {