diff options
author | OPNA2608 <opna2608@protonmail.com> | 2024-06-07 11:37:49 +0200 |
---|---|---|
committer | OPNA2608 <opna2608@protonmail.com> | 2024-06-07 11:37:49 +0200 |
commit | 4a495ec755c826f6b23147a6a77dd2148c934f18 (patch) | |
tree | b4702ce2ca8563ac9a756277555538fac2d06439 | |
parent | 7f084b0fe1ec8daef5c77fe76d1407b57e4389bb (diff) |
tests/lomiri-filemanager-app: init
-rw-r--r-- | nixos/tests/all-tests.nix | 1 | ||||
-rw-r--r-- | nixos/tests/lomiri-filemanager-app.nix | 48 | ||||
-rw-r--r-- | pkgs/desktops/lomiri/applications/lomiri-filemanager-app/default.nix | 2 |
3 files changed, 51 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index aa7e007e4fddb..ddeeeb298c356 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -516,6 +516,7 @@ in { lxd-image-server = handleTest ./lxd-image-server.nix {}; #logstash = handleTest ./logstash.nix {}; lomiri = handleTest ./lomiri.nix {}; + lomiri-filemanager-app = runTest ./lomiri-filemanager-app.nix; lomiri-system-settings = handleTest ./lomiri-system-settings.nix {}; lorri = handleTest ./lorri/default.nix {}; maddy = discoverTests (import ./maddy { inherit handleTest; }); diff --git a/nixos/tests/lomiri-filemanager-app.nix b/nixos/tests/lomiri-filemanager-app.nix new file mode 100644 index 0000000000000..de42c9d150894 --- /dev/null +++ b/nixos/tests/lomiri-filemanager-app.nix @@ -0,0 +1,48 @@ +{ pkgs, lib, ... }: +{ + name = "lomiri-filemanager-app-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 + lomiri-filemanager-app + ]; + 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("lomiri filemanager launches"): + machine.execute("lomiri-filemanager-app >&2 &") + machine.wait_for_text(r"(filemanager.ubports|alice|items|directories|files|folder)") + machine.screenshot("lomiri-filemanager_open") + + machine.succeed("pkill -f lomiri-filemanager-app") + + with subtest("lomiri filemanager localisation works"): + machine.execute("env LANG=de_DE.UTF-8 lomiri-filemanager-app >&2 &") + machine.wait_for_text(r"(Elemente|Verzeichnisse|Dateien|Ordner)") + machine.screenshot("lomiri-filemanager_localised") + ''; +} diff --git a/pkgs/desktops/lomiri/applications/lomiri-filemanager-app/default.nix b/pkgs/desktops/lomiri/applications/lomiri-filemanager-app/default.nix index dddbbc5a6fb3f..fa91e1531bf21 100644 --- a/pkgs/desktops/lomiri/applications/lomiri-filemanager-app/default.nix +++ b/pkgs/desktops/lomiri/applications/lomiri-filemanager-app/default.nix @@ -4,6 +4,7 @@ fetchFromGitLab, fetchpatch, gitUpdater, + nixosTests, biometryd, cmake, content-hub, @@ -125,6 +126,7 @@ stdenv.mkDerivation (finalAttrs: { ''; passthru = { + tests.vm = nixosTests.lomiri-filemanager-app; updateScript = gitUpdater { rev-prefix = "v"; }; }; |