From ad74a52e0badbfbb50b76f27b14693965f413c04 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 30 Oct 2025 12:16:16 -0700 Subject: [PATCH] tweak check_software_start to wait longer for ignore 10 seconds isn't enough, the aarch64 upgrade tests often fail because they're still Refreshing Data after 10 seconds, then the ignore button appears but we already quit looking for it. Let's wait 150 seconds for *either* the ignore button *or* the UI to appear, if the UI appears we're done instantly, if the ignore button appears, click it and wait for the UI. Signed-off-by: Adam Williamson --- lib/utils.pm | 11 ++++++----- tests/graphical_upgrade_prerequisites.pm | 6 ------ 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/lib/utils.pm b/lib/utils.pm index d28dadef..9ca46601 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -1874,12 +1874,13 @@ sub dm_perform_login { # This subroutine handles it, so we can use it on multiple # places around the test cases. sub check_software_start { - if (check_screen("gnome_software_ignore", 10)) { - wait_still_screen(3); - # match again as the dialog might have moved a bit - assert_and_click("gnome_software_ignore"); + assert_screen(['desktop_package_tool_update', 'gnome_software_ignore'], 150); + if (match_has_tag 'gnome_software_ignore') { + wait_still_screen 3; + # match again as the dialog may have moved a bit + assert_and_click 'gnome_software_ignore'; + assert_screen("desktop_package_tool_update"); } - assert_screen("desktop_package_tool_update"); } # Reboots the system using the desktop environment's diff --git a/tests/graphical_upgrade_prerequisites.pm b/tests/graphical_upgrade_prerequisites.pm index ba54b2d2..d3386bd6 100644 --- a/tests/graphical_upgrade_prerequisites.pm +++ b/tests/graphical_upgrade_prerequisites.pm @@ -43,12 +43,6 @@ sub run { menu_launch_type("software"); check_software_start(); - # When Software is started for the first time, it asks whether - # a user wants to use Third Party software. We want to Ignore - # this and proceed, so if we see that we click on Ignore. - if (check_screen("gnome_software_ignore", timeout => 60)) { - click_lastmatch(); - } # Wait a couple of second, just in case the file needs a little # longer to be created. sleep(10);