From bfb1d2c570cd784f1faff5683d10ea53af51f6dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20R=C5=AF=C5=BEi=C4=8Dka?= Date: Tue, 2 Apr 2024 15:53:21 +0200 Subject: [PATCH] Add progress --- tests/applications/okular/rotate.pm | 1 - tests/applications/okular/save_as.pm | 14 +++----------- tests/applications/okular/search.pm | 8 +++----- tests/applications/okular/shortcuts.pm | 21 ++------------------- 4 files changed, 8 insertions(+), 36 deletions(-) diff --git a/tests/applications/okular/rotate.pm b/tests/applications/okular/rotate.pm index 47ed18c9..723fd3d4 100644 --- a/tests/applications/okular/rotate.pm +++ b/tests/applications/okular/rotate.pm @@ -6,7 +6,6 @@ use utils; # This part of the suite tests that Evince can rotate the content. sub rotate_content { - # Send the key combo to rotate the content assert_and_click("okular_menu_view"); assert_and_click("okular_submenu_orientation"); diff --git a/tests/applications/okular/save_as.pm b/tests/applications/okular/save_as.pm index 201918bf..c539abb5 100644 --- a/tests/applications/okular/save_as.pm +++ b/tests/applications/okular/save_as.pm @@ -9,24 +9,16 @@ 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); # Select Save As - assert_and_click("evince_menu_saveas", button => "left", timeout => 30); + assert_and_click("okular_menu_saveas", button => "left", timeout => 30); wait_still_screen(2); # Type a new name. type_very_safely("alternative"); - # Click on the Save button - if (get_var("CANNED")) { - # FIXME: as of 2023-03-30 on the flatpak version of evince, the save as - # default target dir is wrong: - # https://bugzilla.redhat.com/show_bug.cgi?id=2183356 - # so we need to click into Documents first - assert_and_click("evince_documents", button => "left", timeout => 30); - } - assert_and_click("gnome_button_save_blue", button => "left", timeout => 30); + assert_and_click("okular_button_save", button => "left", timeout => 30); # Now the document is saved under a different name. We will switch to the # terminal console to check that it has been created. diff --git a/tests/applications/okular/search.pm b/tests/applications/okular/search.pm index e1d42bd1..49128429 100644 --- a/tests/applications/okular/search.pm +++ b/tests/applications/okular/search.pm @@ -8,16 +8,14 @@ use utils; sub run { my $self = shift; - # Click on the Search button to search for text - assert_and_click("evince_search_button", button => "left", timeout => 30); + # Send a key combo to invoke search + send_key("ctrl-f"); # Type *pages*. type_very_safely("pages"); - # Press Enter. - send_key("ret"); # Check that the typed text has been found. - assert_screen("evince_search_found", timeout => 30); + assert_screen("okular_search_found", timeout => 30); } diff --git a/tests/applications/okular/shortcuts.pm b/tests/applications/okular/shortcuts.pm index b56c7825..46e1d528 100644 --- a/tests/applications/okular/shortcuts.pm +++ b/tests/applications/okular/shortcuts.pm @@ -9,27 +9,10 @@ sub run { my $self = shift; # Open the menu - assert_and_click("gnome_burger_menu", button => "left", timeout => 30); - wait_still_screen 2; - - # Select the Keyboard Shortcuts item - assert_and_click("evince_menu_shortcuts", button => "left", timeout => 30); - wait_still_screen 2; + send_key("ctrl+alt+,"); # Check that Shortcuts has been shown - assert_screen("evince_shortcuts_shown"); - - # Click on number 2 to arrive to the second page - assert_and_click("evince_shortcuts_second", button => "left", timeout => 30); - - # Check that Shortcuts 2 has been shown - assert_screen("evince_shortcuts_second_shown"); - - # Click on number 3 to arrive to the second page - assert_and_click("evince_shortcuts_third", button => "left", timeout => 30); - - # Check that Shortcuts 3 has been shown - assert_screen("evince_shortcuts_third_shown"); + assert_screen("okular_shortcuts_shown"); } sub test_flags {