diff options
author | Adam C. Stephens <2071575+adamcstephens@users.noreply.github.com> | 2024-03-25 16:38:52 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-25 16:38:52 -0400 |
commit | 8893c5886a8d1386c4b3ce064b13d04d79c84f9f (patch) | |
tree | 908fbfedb3251fe70cd8f7b8526e2740f1537cb5 /nixos | |
parent | cb95024865f01dc64c975b2f4eca1e5ca5be3798 (diff) | |
parent | c3a1620624bc68eb90a305d9ce9e50a9681bc3f3 (diff) | |
download | nixlib-8893c5886a8d1386c4b3ce064b13d04d79c84f9f.tar nixlib-8893c5886a8d1386c4b3ce064b13d04d79c84f9f.tar.gz nixlib-8893c5886a8d1386c4b3ce064b13d04d79c84f9f.tar.bz2 nixlib-8893c5886a8d1386c4b3ce064b13d04d79c84f9f.tar.lz nixlib-8893c5886a8d1386c4b3ce064b13d04d79c84f9f.tar.xz nixlib-8893c5886a8d1386c4b3ce064b13d04d79c84f9f.tar.zst nixlib-8893c5886a8d1386c4b3ce064b13d04d79c84f9f.zip |
Merge pull request #263404 from camillemndn/firefoxpwa
firefoxpwa: init at 2.11.1
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/tests/all-tests.nix | 1 | ||||
-rw-r--r-- | nixos/tests/firefoxpwa.nix | 36 |
2 files changed, 37 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index d9e910807932..69d340bae277 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -309,6 +309,7 @@ in { firefox-devedition = handleTest ./firefox.nix { firefoxPackage = pkgs.firefox-devedition; }; firefox-esr = handleTest ./firefox.nix { firefoxPackage = pkgs.firefox-esr; }; # used in `tested` job firefox-esr-115 = handleTest ./firefox.nix { firefoxPackage = pkgs.firefox-esr-115; }; + firefoxpwa = handleTest ./firefoxpwa.nix {}; firejail = handleTest ./firejail.nix {}; firewall = handleTest ./firewall.nix { nftables = false; }; firewall-nftables = handleTest ./firewall.nix { nftables = true; }; diff --git a/nixos/tests/firefoxpwa.nix b/nixos/tests/firefoxpwa.nix new file mode 100644 index 000000000000..374d67b01ac6 --- /dev/null +++ b/nixos/tests/firefoxpwa.nix @@ -0,0 +1,36 @@ +import ./make-test-python.nix ({ lib, ... }: + +{ + name = "firefoxpwa"; + meta.maintainers = with lib.maintainers; [ camillemndn ]; + + nodes.machine = + { pkgs, ... }: + { + imports = [ ./common/x11.nix ]; + environment.systemPackages = with pkgs; [ firefoxpwa jq ]; + + programs.firefox = { + enable = true; + nativeMessagingHosts.packages = [ pkgs.firefoxpwa ]; + }; + + services.jellyfin.enable = true; + }; + + enableOCR = true; + + testScript = '' + machine.start() + + with subtest("Install a progressive web app"): + machine.wait_for_unit("jellyfin.service") + machine.wait_for_open_port(8096) + machine.succeed("firefoxpwa site install http://localhost:8096/web/manifest.json >&2") + + with subtest("Launch the progressive web app"): + machine.succeed("firefoxpwa site launch $(jq -r < ~/.local/share/firefoxpwa/config.json '.sites | keys[0]') >&2") + machine.wait_for_window("Jellyfin") + machine.wait_for_text("Jellyfin") + ''; +}) |