From 5f1a8eb355eac08e2b467e6d5a1c1afcd56a8ada Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 16 Oct 2024 12:49:57 -0700 Subject: [PATCH] select_disks: workaround failed first Destination click In tests of the Rawhide anaconda update that ports to Wayland, we often hit failures because the first attempt to click on Installation Destination doesn't work. This only happened on prod (not staging), it didn't happen every time (but quite often), and we can't reproduce it manually, so it seems like a weird glitch that we should just work around. Simply waiting a second and clicking again seems to do the job, and should be safe even if the first click works (the second click will just be on an empty area of the Installation Destination screen, unless we have like eight disks attached). Signed-off-by: Adam Williamson --- lib/anaconda.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/anaconda.pm b/lib/anaconda.pm index b9525f95..1213bd2d 100644 --- a/lib/anaconda.pm +++ b/lib/anaconda.pm @@ -30,8 +30,14 @@ sub select_disks { # Anaconda hub assert_screen "anaconda_main_hub", 300; # Damn animation delay can cause bad clicks here too - wait for it - sleep 1; + wait_still_screen 3; assert_and_click "anaconda_main_hub_install_destination"; + # it seems that sometimes the first click doesn't work with wayland + # on anaconda. we can't reproduce this manually, so work around it + # by just clicking again, this is safe even if the first click + # *did* work + sleep 1; + click_lastmatch; # this is awkward, but on the install_repository_hd_variation test, # we have two disks but in F39 and F40 anaconda knows we're using