test: check for correct version in admin settings

This commit is contained in:
WilliButz 2023-10-04 16:32:01 +02:00
parent 251d78a7f2
commit bc05d5ce25
No known key found for this signature in database
GPG key ID: FB0513677AB15BEA
2 changed files with 11 additions and 1 deletions

View file

@ -198,7 +198,7 @@
}; };
}; };
checks.default = (import ./test.nix { checks.default = (import ./test.nix {
inherit pkgs; inherit pkgs authentik-version;
inherit (self) nixosModules; inherit (self) nixosModules;
}); });
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {

View file

@ -1,4 +1,5 @@
{ pkgs { pkgs
, authentik-version
, nixosModules , nixosModules
}: }:
let let
@ -66,5 +67,14 @@ pkgs.nixosTest {
machine.wait_for_text("My applications") machine.wait_for_text("My applications")
machine.send_key("esc") machine.send_key("esc")
machine.screenshot("initial-setup_2") machine.screenshot("initial-setup_2")
with subtest("admin settings render and version as expected"):
machine.succeed("su - alice -c 'firefox http://localhost:9000/if/admin' >&2 &")
machine.wait_for_text("General system status")
machine.screenshot("initial-setup_3")
machine.succeed("su - alice -c 'xdotool click 1' >&2")
machine.succeed("su - alice -c 'xdotool key --delay 100 Page_Down Page_Down' >&2")
machine.wait_for_text("${authentik-version}")
machine.screenshot("initial-setup_4")
''; '';
} }