From a7cd9f30dbca78a792ec82fabc98a61c6a2ad88f Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 20 Aug 2024 18:10:04 -0700 Subject: [PATCH] gnome-text-editor: also select right directory for nautilus chooser The nautilus-provided chooser also does not default to Documents as the output directory. Sigh. Signed-off-by: Adam Williamson --- tests/applications/gnome-text-editor/new_file.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/applications/gnome-text-editor/new_file.pm b/tests/applications/gnome-text-editor/new_file.pm index 0abec6a6..dc2f784c 100644 --- a/tests/applications/gnome-text-editor/new_file.pm +++ b/tests/applications/gnome-text-editor/new_file.pm @@ -34,9 +34,14 @@ 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"); + + if (check_screen "nautilus_save_filename") { + # if we hit the nautilus save-as screen, we have to select + # the right folder... + assert_and_click "nautilus_directory_documents"; + # then click to edit the filename + assert_and_click "nautilus_save_filename"; + } # select the entire prefilled name (including extension) to overwrite it send_key("ctrl-a"); wait_still_screen(3);