about summary refs log tree commit diff
path: root/nixos/tests/yabar.nix
blob: 212a8ce4bbf5f00511354f562d6c7aa1e606f4cd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import ./make-test-python.nix ({ pkgs, lib, ... }: {
  name = "yabar";
  meta.maintainers = [ ];

  nodes.machine = {
    imports = [ ./common/x11.nix ./common/user-account.nix ];

    test-support.displayManager.auto.user = "bob";

    programs.yabar.enable = true;
    programs.yabar.bars = {
      top.indicators.date.exec = "YABAR_DATE";
    };
  };

  testScript = ''
    machine.start()
    machine.wait_for_x()

    # confirm proper startup
    machine.wait_for_unit("yabar.service", "bob")
    machine.sleep(10)
    machine.wait_for_unit("yabar.service", "bob")

    machine.screenshot("top_bar")
  '';
})