From 7bf3bd868939131bda42384b43d741b1d94f25e0 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mon, 14 Mar 2022 16:32:29 -0700 Subject: [PATCH] Drop similarity levels on type(_very)_safely, solidify_wallpaper I noticed today that we're timing out all the time on these wait_still_screens in gnome-terminal, because it uses a big flashing cursor and the similarity between "cursor there" and "cursor not there" is less than 45 or 42 (it seems to be 38.x). So let's drop these levels to 38, hopefully that's not too low. There are probably more places where this is an issue, I'll change them as I notice them. Signed-off-by: Adam Williamson --- lib/utils.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/utils.pm b/lib/utils.pm index 3091f355..78f2c9c3 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -47,9 +47,9 @@ sub type_safely { sub type_very_safely { my $string = shift; type_string($string, wait_screen_change => 1, max_interval => 1); - # similarity level 45 as there will commonly be a flashing - # cursor and the default level (47) is slightly too tight - wait_still_screen(stilltime=>5, similarity_level=>45); + # similarity level 38 as there will commonly be a flashing + # cursor and the default level (47) is too tight + wait_still_screen(stilltime=>5, similarity_level=>38); } sub get_release_number { @@ -1443,14 +1443,14 @@ sub solidify_wallpaper { # Start the terminal to set up backgrounds. menu_launch_type "gnome-terminal"; # wait to be sure it's fully open - wait_still_screen(stilltime=>5, similarity_level=>42); + wait_still_screen(stilltime=>5, similarity_level=>38); # When the application opens, run command in it to set the background to black type_very_safely "gsettings set org.gnome.desktop.background picture-uri ''"; send_key 'ret'; - wait_still_screen(stilltime=>2, similarity_level=>42); + wait_still_screen(stilltime=>2, similarity_level=>38); type_very_safely "gsettings set org.gnome.desktop.background primary-color '#000000'"; send_key 'ret'; - wait_still_screen(stilltime=>2, similarity_level=>42); + wait_still_screen(stilltime=>2, similarity_level=>38); quit_with_shortcut(); # check that is has changed color assert_screen 'apps_settings_screen_black';