1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 22:50:49 +00:00
nixpkgs/nixos/tests/i3wm.nix
aszlig 19a7494600
nixos: Add VM test for i3 window manager.
Currently just makes sure that by default it's possible to open a
terminal.

And exactly this should be the main point that might confuse users of i3
in NixOS, because i3 doesn't print a warning/error if it is unable to
start the terminal emulator.

Thanks to @waaaaargh for reporting this issue.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-03-05 05:21:36 +01:00

29 lines
850 B
Nix

import ./make-test.nix {
name = "i3wm";
machine = { lib, pkgs, ... }: {
imports = [ ./common/x11.nix ./common/user-account.nix ];
services.xserver.displayManager.auto.user = "alice";
services.xserver.windowManager.default = lib.mkForce "i3";
services.xserver.windowManager.i3.enable = true;
};
testScript = { nodes, ... }: ''
$machine->waitForX;
$machine->waitForWindow(qr/first configuration/);
$machine->sleep(1);
$machine->screenshot("started");
$machine->sendKeys("ret");
$machine->sleep(1);
$machine->sendKeys("alt");
$machine->sleep(1);
$machine->screenshot("configured");
$machine->sendKeys("ret");
$machine->sleep(2);
$machine->sendKeys("alt-ret");
$machine->waitForWindow(qr/machine.*alice/);
$machine->sleep(1);
$machine->screenshot("terminal");
'';
}