mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
Merge pull request #263404 from camillemndn/firefoxpwa
firefoxpwa: init at 2.11.1
This commit is contained in:
commit
8893c5886a
4 changed files with 3009 additions and 0 deletions
|
@ -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; };
|
||||
|
|
36
nixos/tests/firefoxpwa.nix
Normal file
36
nixos/tests/firefoxpwa.nix
Normal file
|
@ -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")
|
||||
'';
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue