From 34eba25858cd16b7d116b6313b19d473640bd0cb Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mon, 15 Apr 2024 18:12:08 -0700 Subject: [PATCH] KDE apps_startstop firewall: type password faster This is obviously more prone to mistypes, but firewall-config seems to be timing out if we take more than 25 seconds to type the password, and we take juuust too long with type_very_safely, even after tweaking the sleeps to shorter wait_still_screens here. We could twiddle with those even more, but let's just go with type_safely for now, if that turns out to be too unreliable I'll change tack. Signed-off-by: Adam Williamson --- tests/apps_startstop/kde/firewall.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/apps_startstop/kde/firewall.pm b/tests/apps_startstop/kde/firewall.pm index 348f8a08..b9c14434 100644 --- a/tests/apps_startstop/kde/firewall.pm +++ b/tests/apps_startstop/kde/firewall.pm @@ -7,17 +7,19 @@ use utils; sub run { my $self = shift; + my $password = get_var('ROOT_PASSWORD', 'weakpassword'); # Start the application menu_launch_type 'firewall'; - sleep 5; # Firewall requires password to be entered and confirmed to start. # View password assert_screen "auth_required", timeout => 60; - my $password = get_var('ROOT_PASSWORD', 'weakpassword'); - type_very_safely $password; + wait_still_screen 3; + # FIXME when https://github.com/firewalld/firewalld/issues/1328 + # is fixed, switch (back) to type_very_safely here + type_safely $password; send_key 'ret'; - sleep 5; + wait_still_screen 3; # Check that it is started assert_screen 'firewall_runs';