From ee7e7ed1474623386a301490c1c521ae60503635 Mon Sep 17 00:00:00 2001 From: WilliButz Date: Sat, 7 Sep 2024 22:03:48 +0200 Subject: [PATCH] tests: improve vmtest `wait_for_text()` takes a regex and it seems that sometimes OCR fails to recognize the dots in the version string. To make this more resilient, zero or one symbol is not matched between the numerical components of the version string. --- tests/minimal-vmtest.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/minimal-vmtest.nix b/tests/minimal-vmtest.nix index 867df27..3cbc297 100644 --- a/tests/minimal-vmtest.nix +++ b/tests/minimal-vmtest.nix @@ -78,7 +78,9 @@ pkgs.nixosTest { machine.screenshot("3_rendered_admin_interface") machine.succeed("su - alice -c 'xdotool click 1' >&2") machine.succeed("su - alice -c 'xdotool key --delay 100 Page_Down' >&2") - machine.wait_for_text("${authentik-version}") + # sometimes the cursor covers the version string + machine.succeed("su - alice -c 'xdotool mousemove_relative 50 50' >&2") + machine.wait_for_text("${builtins.replaceStrings ["."] [".?"] authentik-version}") machine.screenshot("4_correct_version_in_admin_interface") with subtest("nginx proxies to authentik"):