1let
2 tests = {
3 wayland = { pkgs, ... }: {
4 imports = [ ./common/wayland-cage.nix ];
5 services.cage.program = "${pkgs.freetube}/bin/freetube";
6 virtualisation.memorySize = 2047;
7 environment.variables.NIXOS_OZONE_WL = "1";
8 environment.variables.DISPLAY = "do not use";
9 };
10 xorg = { pkgs, ... }: {
11 imports = [ ./common/user-account.nix ./common/x11.nix ];
12 virtualisation.memorySize = 2047;
13 services.xserver.enable = true;
14 services.xserver.displayManager.sessionCommands = ''
15 ${pkgs.freetube}/bin/freetube
16 '';
17 test-support.displayManager.auto.user = "alice";
18 };
19 };
20
21 mkTest = name: machine:
22 import ./make-test-python.nix ({ pkgs, ... }: {
23 inherit name;
24 nodes = { "${name}" = machine; };
25 meta.maintainers = with pkgs.lib.maintainers; [ kirillrdy ];
26 enableOCR = true;
27
28 testScript = ''
29 start_all()
30 machine.wait_for_unit('graphical.target')
31 machine.wait_for_text('Your Subscription list is currently empty')
32 machine.send_key("ctrl-r")
33 machine.wait_for_text('Your Subscription list is currently empty')
34 machine.screenshot("main.png")
35 machine.send_key("ctrl-comma")
36 machine.wait_for_text('General Settings', timeout=30)
37 machine.screenshot("preferences.png")
38 '';
39 });
40in
41builtins.mapAttrs (k: v: mkTest k v { }) tests