diff options
Diffstat (limited to 'nixos/tests/keepassxc.nix')
-rw-r--r-- | nixos/tests/keepassxc.nix | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/nixos/tests/keepassxc.nix b/nixos/tests/keepassxc.nix index a4f452412cdf..d487d87fbacb 100644 --- a/nixos/tests/keepassxc.nix +++ b/nixos/tests/keepassxc.nix @@ -17,6 +17,11 @@ import ./make-test-python.nix ({ pkgs, ...} : services.xserver.enable = true; + # for better OCR + environment.etc."icewm/prefoverride".text = '' + ColorActiveTitleBar = "rgb:FF/FF/FF" + ''; + # Regression test for https://github.com/NixOS/nixpkgs/issues/163482 qt = { enable = true; @@ -41,7 +46,7 @@ import ./make-test-python.nix ({ pkgs, ...} : machine.wait_for_x() with subtest("Can create database and entry with CLI"): - ${aliceDo "keepassxc-cli db-create -k foo.keyfile foo.kdbx"} + ${aliceDo "keepassxc-cli db-create --set-key-file foo.keyfile foo.kdbx"} ${aliceDo "keepassxc-cli add --no-password -k foo.keyfile foo.kdbx bar"} with subtest("Ensure KeePassXC starts"): @@ -62,10 +67,21 @@ import ./make-test-python.nix ({ pkgs, ...} : # Wait for the enter password screen to appear. machine.wait_for_text("/home/alice/foo.kdbx") - # Click on "Browse" button to select keyfile + # Click on "I have key file" button to open keyfile dialog + machine.send_key("tab") machine.send_key("tab") + machine.send_key("tab") + machine.send_key("ret") + + # Select keyfile + machine.wait_for_text("Select key file") machine.send_chars("/home/alice/foo.keyfile") machine.send_key("ret") + + # Open database + machine.wait_for_text("foo.kdbx \\[Locked] - KeePassXC") + machine.send_key("ret") + # Database is unlocked (doesn't have "[Locked]" in the title anymore) machine.wait_for_text("foo.kdbx - KeePassXC") ''; |