nixosTests.sway: add swaylock test

This commit is contained in:
Patrick Hilhorst 2022-02-03 20:24:35 +01:00
parent c39cc2e840
commit abcf236f36
No known key found for this signature in database
GPG Key ID: 3BB083304DADC0FF

View File

@ -123,6 +123,13 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
machine.wait_for_text("You pressed the exit shortcut.")
machine.screenshot("sway_exit")
swaymsg("exec swaylock")
machine.wait_until_succeeds("pgrep -x swaylock")
machine.sleep(3)
machine.send_chars("${nodes.machine.config.users.users.alice.password}")
machine.send_key("ret")
machine.wait_until_fails("pgrep -x swaylock")
# Exit Sway and verify process exit status 0:
swaymsg("exit", succeed=False)
machine.wait_until_fails("pgrep -x sway")