2015-07-12 04:09:40 -06:00
|
|
|
import ./make-test.nix ({ pkgs, ...} : {
|
2015-03-04 21:16:26 -07:00
|
|
|
name = "i3wm";
|
2015-07-12 04:09:40 -06:00
|
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
|
|
|
maintainers = [ aszlig ];
|
|
|
|
};
|
2015-03-04 21:16:26 -07:00
|
|
|
|
2018-07-20 14:56:59 -06:00
|
|
|
machine = { lib, ... }: {
|
2015-03-04 21:16:26 -07:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2018-07-20 14:56:59 -06:00
|
|
|
testScript = { ... }: ''
|
2015-03-04 21:16:26 -07:00
|
|
|
$machine->waitForX;
|
2016-04-12 11:12:47 -06:00
|
|
|
$machine->waitForFile("/home/alice/.Xauthority");
|
|
|
|
$machine->succeed("xauth merge ~alice/.Xauthority");
|
2015-03-04 21:16:26 -07:00
|
|
|
$machine->waitForWindow(qr/first configuration/);
|
2018-08-29 11:38:35 -06:00
|
|
|
$machine->sleep(2);
|
2015-03-04 21:16:26 -07:00
|
|
|
$machine->screenshot("started");
|
|
|
|
$machine->sendKeys("ret");
|
2018-08-29 11:38:35 -06:00
|
|
|
$machine->sleep(2);
|
2015-03-04 21:16:26 -07:00
|
|
|
$machine->sendKeys("alt");
|
2018-08-29 11:38:35 -06:00
|
|
|
$machine->sleep(2);
|
2015-03-04 21:16:26 -07:00
|
|
|
$machine->screenshot("configured");
|
|
|
|
$machine->sendKeys("ret");
|
2018-08-29 11:38:35 -06:00
|
|
|
# make sure the config file is created before we continue
|
|
|
|
$machine->waitForFile("/home/alice/.config/i3/config");
|
2015-03-04 21:16:26 -07:00
|
|
|
$machine->sleep(2);
|
|
|
|
$machine->sendKeys("alt-ret");
|
2018-12-09 10:16:49 -07:00
|
|
|
$machine->waitForWindow(qr/alice.*machine/);
|
2018-08-29 11:38:35 -06:00
|
|
|
$machine->sleep(2);
|
2015-03-04 21:16:26 -07:00
|
|
|
$machine->screenshot("terminal");
|
|
|
|
'';
|
2015-07-12 04:09:40 -06:00
|
|
|
})
|