1{ pkgs, ... }:
2{
3 name = "plotinus";
4 meta = {
5 maintainers = pkgs.plotinus.meta.maintainers;
6 timeout = 600;
7 };
8
9 nodes.machine =
10 { pkgs, ... }:
11
12 {
13 imports = [ ./common/x11.nix ];
14 programs.plotinus.enable = true;
15 environment.systemPackages = [
16 pkgs.gnome-pomodoro
17 pkgs.xdotool
18 ];
19 };
20
21 testScript = ''
22 machine.wait_for_x()
23 machine.succeed("gnome-pomodoro >&2 &")
24 machine.wait_for_window("Pomodoro", timeout=120)
25 machine.succeed(
26 "xdotool search --sync --onlyvisible --class gnome-pomodoro "
27 + "windowfocus --sync key --clearmodifiers --delay 1 'ctrl+shift+p'"
28 )
29 machine.sleep(5) # wait for the popup
30 machine.screenshot("popup")
31 machine.succeed("xdotool key --delay 100 p r e f e r e n c e s Return")
32 machine.wait_for_window("Preferences", timeout=120)
33 '';
34}