From 23ebeb226970d61ff9caa6994cc4254def7d0569 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 20 Aug 2024 16:33:38 -0700 Subject: [PATCH] Handle hitting the new Nautilus save as dialog in more places Signed-off-by: Adam Williamson --- ...20.json => nautilus_save_filename-20240820.json} | 4 ++-- ...0820.png => nautilus_save_filename-20240820.png} | Bin tests/applications/evince/save_as.pm | 4 ++++ tests/applications/gnome-text-editor/new_file.pm | 3 +++ tests/applications/maps/export.pm | 2 +- 5 files changed, 10 insertions(+), 3 deletions(-) rename needles/gnome/{apps/maps/maps_export_filename-20240820.json => nautilus_save_filename-20240820.json} (78%) rename needles/gnome/{apps/maps/maps_export_filename-20240820.png => nautilus_save_filename-20240820.png} (100%) diff --git a/needles/gnome/apps/maps/maps_export_filename-20240820.json b/needles/gnome/nautilus_save_filename-20240820.json similarity index 78% rename from needles/gnome/apps/maps/maps_export_filename-20240820.json rename to needles/gnome/nautilus_save_filename-20240820.json index 51a12de1..b054d6fc 100644 --- a/needles/gnome/apps/maps/maps_export_filename-20240820.json +++ b/needles/gnome/nautilus_save_filename-20240820.json @@ -10,6 +10,6 @@ ], "properties": [], "tags": [ - "maps_export_filename" + "nautilus_save_filename" ] -} \ No newline at end of file +} diff --git a/needles/gnome/apps/maps/maps_export_filename-20240820.png b/needles/gnome/nautilus_save_filename-20240820.png similarity index 100% rename from needles/gnome/apps/maps/maps_export_filename-20240820.png rename to needles/gnome/nautilus_save_filename-20240820.png diff --git a/tests/applications/evince/save_as.pm b/tests/applications/evince/save_as.pm index 1228e88a..13bfbcd7 100644 --- a/tests/applications/evince/save_as.pm +++ b/tests/applications/evince/save_as.pm @@ -15,6 +15,10 @@ sub run { assert_and_click("evince_menu_saveas", button => "left", timeout => 30); wait_still_screen(2); + # if we hit the nautilus save-as screen, we have to click to edit + # the filename + click_lastmatch if (check_screen "nautilus_save_filename"); + # Type a new name. type_very_safely("alternative"); diff --git a/tests/applications/gnome-text-editor/new_file.pm b/tests/applications/gnome-text-editor/new_file.pm index 53f28ded..8cbd94ad 100644 --- a/tests/applications/gnome-text-editor/new_file.pm +++ b/tests/applications/gnome-text-editor/new_file.pm @@ -34,6 +34,9 @@ sub run { # Save the newly created file. send_key("ctrl-s"); wait_still_screen(3); + # if we hit the nautilus save-as screen, we have to click to edit + # the filename + click_lastmatch if (check_screen "nautilus_save_filename"); # select the entire prefilled name (including extension) to overwrite it send_key("ctrl-a"); wait_still_screen(3); diff --git a/tests/applications/maps/export.pm b/tests/applications/maps/export.pm index b142a4ed..22ffca7e 100644 --- a/tests/applications/maps/export.pm +++ b/tests/applications/maps/export.pm @@ -36,7 +36,7 @@ sub run { assert_and_click("maps_button_export"); wait_still_screen(2); # Rename the file and export it - assert_and_click("maps_export_filename"); + assert_and_click("nautilus_save_filename"); type_very_safely("exported-map"); assert_and_click("maps_button_save"); }