diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-02-26 16:20:28 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-02-26 16:20:28 +0100 |
commit | 647438344bfc1f77791391e2b4f98eef865c63dc (patch) | |
tree | ef580867fc6cc413940e4330d939cf1afda082cb /nixpkgs/nixos/tests/morph-browser.nix | |
parent | b084c6a0fab7f32c904c5c8e8db8dddcefbe507f (diff) | |
parent | e3474e1d1e53b70e2b2af73ea26d6340e82f6b8b (diff) | |
download | nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.tar nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.tar.gz nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.tar.bz2 nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.tar.lz nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.tar.xz nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.tar.zst nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.zip |
Merge commit 'e3474e1d1e53'
Diffstat (limited to 'nixpkgs/nixos/tests/morph-browser.nix')
-rw-r--r-- | nixpkgs/nixos/tests/morph-browser.nix | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/nixpkgs/nixos/tests/morph-browser.nix b/nixpkgs/nixos/tests/morph-browser.nix new file mode 100644 index 000000000000..859e6bb47646 --- /dev/null +++ b/nixpkgs/nixos/tests/morph-browser.nix @@ -0,0 +1,53 @@ +import ./make-test-python.nix ({ pkgs, lib, ... }: { + name = "morph-browser-standalone"; + meta.maintainers = lib.teams.lomiri.members; + + nodes.machine = { config, pkgs, ... }: { + imports = [ + ./common/x11.nix + ]; + + services.xserver.enable = true; + + environment = { + systemPackages = with pkgs.lomiri; [ + suru-icon-theme + morph-browser + ]; + variables = { + UITK_ICON_THEME = "suru"; + }; + }; + + i18n.supportedLocales = [ "all" ]; + + fonts.packages = with pkgs; [ + # Intended font & helps with OCR + ubuntu_font_family + ]; + }; + + enableOCR = true; + + testScript = + '' + machine.wait_for_x() + + with subtest("morph browser launches"): + machine.execute("morph-browser >&2 &") + machine.wait_for_text(r"Web Browser|New|sites|Bookmarks") + machine.screenshot("morph_open") + + with subtest("morph browser displays HTML"): + machine.send_chars("file://${pkgs.valgrind.doc}/share/doc/valgrind/html/index.html\n") + machine.wait_for_text("Valgrind Documentation") + machine.screenshot("morph_htmlcontent") + + machine.succeed("pkill -f morph-browser") + + with subtest("morph browser localisation works"): + machine.execute("env LANG=de_DE.UTF-8 morph-browser >&2 &") + machine.wait_for_text(r"Web-Browser|Neuer|Seiten|Lesezeichen") + machine.screenshot("morph_localised") + ''; +}) |