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 <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2024-04-15 18:12:08 -07:00
parent a8f547f5ef
commit 34eba25858
1 changed files with 6 additions and 4 deletions

View File

@ -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';