From 75406ee7f4c7ffb246f22cc85985edcae8bd49c8 Mon Sep 17 00:00:00 2001 From: Lukas Ruzicka Date: Wed, 6 Nov 2024 12:15:48 +0100 Subject: [PATCH] On Network tests, authenticate if need be. --- tests/applications/gnome-panel/network.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/applications/gnome-panel/network.pm b/tests/applications/gnome-panel/network.pm index dd220f3e..55e7a213 100644 --- a/tests/applications/gnome-panel/network.pm +++ b/tests/applications/gnome-panel/network.pm @@ -32,6 +32,13 @@ sub run { # it does not work reliably. Ergo, we will use the old known # ctrl-alt-f2 select_console "tty2-console"; + # Sometimes, we can see an authentication dialogue which + # prevents the test from continuing. Authenticate, + # if that is the case. + my $pass = get_var("USER_PASSWORD", "weakpassword"); + if (check_screen("auth_required", timeout => 30)) { + type_very_safely("$pass\n"); + } sleep(3); # Toggle network