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 <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2023-04-22 11:03:00 -07:00
parent da3f9df5b7
commit 853ed17664
1 changed files with 8 additions and 0 deletions

View File

@ -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");