at 25.11-pre 1.1 kB view raw
1import ./make-test-python.nix ( 2 { lib, ... }: 3 4 { 5 name = "firefoxpwa"; 6 meta.maintainers = with lib.maintainers; [ camillemndn ]; 7 8 nodes.machine = 9 { pkgs, ... }: 10 { 11 imports = [ ./common/x11.nix ]; 12 environment.systemPackages = with pkgs; [ 13 firefoxpwa 14 jq 15 ]; 16 17 programs.firefox = { 18 enable = true; 19 nativeMessagingHosts.packages = [ pkgs.firefoxpwa ]; 20 }; 21 22 services.jellyfin.enable = true; 23 }; 24 25 enableOCR = true; 26 27 testScript = '' 28 machine.start() 29 30 with subtest("Install a progressive web app"): 31 machine.wait_for_unit("jellyfin.service") 32 machine.wait_for_open_port(8096) 33 machine.succeed("firefoxpwa site install http://localhost:8096/web/manifest.json >&2") 34 35 with subtest("Launch the progressive web app"): 36 machine.succeed("firefoxpwa site launch $(jq -r < ~/.local/share/firefoxpwa/config.json '.sites | keys[0]') >&2") 37 machine.wait_for_window("Jellyfin") 38 machine.wait_for_text("Jellyfin") 39 ''; 40 } 41)