at 24.11-pre 1.5 kB view raw
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 # time-out on ofborg 27 meta.broken = pkgs.stdenv.isAarch64; 28 enableOCR = true; 29 30 testScript = '' 31 start_all() 32 machine.wait_for_unit('graphical.target') 33 machine.wait_for_text('Your Subscription list is currently empty') 34 machine.send_key("ctrl-r") 35 machine.wait_for_text('Your Subscription list is currently empty') 36 machine.screenshot("main.png") 37 machine.send_key("ctrl-comma") 38 machine.wait_for_text('General Settings', timeout=30) 39 machine.screenshot("preferences.png") 40 ''; 41 }); 42in 43builtins.mapAttrs (k: v: mkTest k v) tests