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