From 57dc6b691a08214c270418274b1e666335e6ba76 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mon, 15 Jul 2024 16:30:55 -0700 Subject: [PATCH] maps/export: tweak for respin testing We also need to use the old workflow for f40 respin testing. Also, put back a wait and some comments that were left out of the 'old' flow. Signed-off-by: Adam Williamson --- tests/applications/maps/export.pm | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/tests/applications/maps/export.pm b/tests/applications/maps/export.pm index daa88634..65e3fd3b 100644 --- a/tests/applications/maps/export.pm +++ b/tests/applications/maps/export.pm @@ -13,13 +13,25 @@ sub run { assert_and_click("gnome_burger_menu"); assert_and_click("maps_menu_export"); - # The Rawhide version is not the latest one, so - # this will only be valid for non Silverblue images. - # For Silverblue, check the else statement. When - # the newest version get into Silverblue, - # the condition should be removed. + my $relnum = get_release_number; + # the export flow was changed in gnome-maps 47. Releases earlier + # than Rawhide and, for now, the flatpak build are still 46, so + # we use the older flow there # FIXME! - if (get_var('SUBVARIANT') ne 'Silverblue') { + if ($relnum < 41 || get_var('CANNED')) { + # old flow + # wait for the export screen to appear and settle + assert_screen('maps_button_export'); + wait_still_screen(2); + # Rename the file and export it. + # The name entry field should have focus already, so we are + # just going to rename the proposed file name. + send_key('ctrl-a'); + type_very_safely('exported-map.png'); + assert_and_click('maps_button_export'); + } + else { + # new flow # wait for the export screen to appear and settle assert_and_click("maps_button_export"); wait_still_screen(2); @@ -30,12 +42,6 @@ sub run { type_very_safely("exported-map.png"); assert_and_click("maps_button_save"); } - else { - assert_screen('maps_button_export'); - send_key('ctrl-a'); - type_very_safely('exported-map.png'); - assert_and_click('maps_button_export'); - } # After the map has been exported, we will open # it in an image viewer to see that it is correct.