diff --git a/needles/gnome/apps/nautilus/nautilus_instances_check-20240219.json b/needles/gnome/apps/nautilus/nautilus_instances_check-20240219.json new file mode 100644 index 00000000..d7b03de2 --- /dev/null +++ b/needles/gnome/apps/nautilus/nautilus_instances_check-20240219.json @@ -0,0 +1,22 @@ +{ + "area": [ + { + "width": 70, + "ypos": 454, + "type": "match", + "xpos": 671, + "height": 51 + }, + { + "xpos": 282, + "height": 46, + "type": "match", + "ypos": 456, + "width": 72 + } + ], + "properties": [], + "tags": [ + "nautilus_instances_check" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/nautilus/nautilus_instances_check-20240219.png b/needles/gnome/apps/nautilus/nautilus_instances_check-20240219.png new file mode 100644 index 00000000..18b9773e Binary files /dev/null and b/needles/gnome/apps/nautilus/nautilus_instances_check-20240219.png differ diff --git a/tests/applications/nautilus/delete_file.pm b/tests/applications/nautilus/delete_file.pm index 6d6a58ee..4b978974 100644 --- a/tests/applications/nautilus/delete_file.pm +++ b/tests/applications/nautilus/delete_file.pm @@ -16,7 +16,7 @@ sub run { # Press the keyboard shortcut to delete the file and wait until file disappears send_key("delete"); - wait_still_screen(1); + wait_still_screen(2); # Now, find the confirmation and click on Undo to return the operation. assert_and_click("nautilus_delete_undo"); diff --git a/tests/applications/nautilus/hidden_files.pm b/tests/applications/nautilus/hidden_files.pm index fb979f5a..c8098e32 100644 --- a/tests/applications/nautilus/hidden_files.pm +++ b/tests/applications/nautilus/hidden_files.pm @@ -5,6 +5,21 @@ use utils; # Show and unshow hidden files. +sub toggle_hidden { + # Toggle hidden files using keyboard short cut or menu. + my $type = shift; + if ($type eq "menu") { + assert_and_click("gnome_burger_menu"); + wait_still_screen(2); + assert_and_click("nautilus_toggle_hidden_files", timeout => '30', button => 'left', mousehide => '1'); + wait_still_screen(5); + } + else { + send_key("ctrl-h"); + wait_still_screen(5); + } +} + sub run { my $self = shift; @@ -25,8 +40,7 @@ sub run { # Now toggle the status of the invisible files and check that it is changed now # using the keyboard shortcut. - send_key("ctrl-h"); - wait_still_screen(2); + toggle_hidden("key"); # Now let us check again, if the invisible file is seen. if (check_screen("nautilus_hidden_file_shown")) { @@ -38,11 +52,8 @@ sub run { die("The ctrl-h keyboard shortcut should have changed the status of invisible files, but the status has not been changed which indicates that the shortcut might not have worked correctly."); } - # Now use the menu to change the status of the invisible files. - assert_and_click("gnome_burger_menu"); - wait_still_screen(2); - assert_and_click("nautilus_toggle_hidden_files", timeout => '30', button => 'left', mousehide => '1'); - wait_still_screen(2); + # Toggle again + toggle_hidden("menu"); # Check the current status of the invisible files. if (check_screen("nautilus_hidden_file_shown")) {