From 853ed1766471e4c85bc257a382e6c936f5a74533 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Sat, 22 Apr 2023 11:03:00 -0700 Subject: [PATCH] Handle app appearing before access request in gnome-panel test Similar to the dedicated tests for these apps, the app can appear for a split second before the access request, so we match on the app and don't realize we need to click through the access request. Handle this the same way we do in the dedicated tests. Signed-off-by: Adam Williamson --- tests/applications/gnome-panel/timedate.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/applications/gnome-panel/timedate.pm b/tests/applications/gnome-panel/timedate.pm index f7a44855..68cdc7cb 100644 --- a/tests/applications/gnome-panel/timedate.pm +++ b/tests/applications/gnome-panel/timedate.pm @@ -28,6 +28,10 @@ sub run { # the clock application will be shown. assert_and_click("panel_add_world_clocks"); assert_screen(["apps_run_clocks", "grant_access"]); + # sometimes we match apps_run_clocks for a split second before + # grant_access appears, so handle that + wait_still_screen 3; + assert_screen(["apps_run_clocks", "grant_access"]); click_lastmatch; if (match_has_tag("grant_access")) { assert_and_click("apps_run_clocks"); @@ -40,6 +44,10 @@ sub run { assert_and_click("panel_datetime"); assert_and_click("panel_select_weather_location"); assert_screen(["apps_run_weather", "grant_access"]); + # sometimes we match apps_run_weather for a split second before + # grant_access appears, so handle that + wait_still_screen 3; + assert_screen(["apps_run_weather", "grant_access"]); click_lastmatch; if (match_has_tag("grant_access")) { assert_and_click("apps_run_weather");