From 96118b4b60680db830bf38244a42ca455978b87e Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mar 17 2023 16:19:35 +0000 Subject: Maps: handle app UI showing briefly before the access prompt See e.g. https://openqa.fedoraproject.org/tests/1829593 sometimes we see the app UI briefly before the access prompt appears. Handle that case by waiting a few seconds and doing the match again. Signed-off-by: Adam Williamson --- diff --git a/tests/applications/maps/aaa_setup.pm b/tests/applications/maps/aaa_setup.pm index 6fd14fb..ba81272 100644 --- a/tests/applications/maps/aaa_setup.pm +++ b/tests/applications/maps/aaa_setup.pm @@ -13,6 +13,10 @@ sub run { menu_launch_type("Maps"); # Check it has started, or we got the permission prompt assert_screen ['apps_run_maps', 'grant_access']; + # sometimes we match apps_run_maps for a split second before + # grant_access appears, so handle that + wait_still_screen 3; + assert_screen ['apps_run_maps', 'grant_access']; if (match_has_tag 'grant_access') { click_lastmatch; assert_screen 'apps_run_maps';