tests/morph-browser: Add standalone (non-Lomiri) test
This commit is contained in:
parent
48e5ed9ad1
commit
a8069ff58a
|
@ -539,6 +539,7 @@ in {
|
||||||
mongodb = handleTest ./mongodb.nix {};
|
mongodb = handleTest ./mongodb.nix {};
|
||||||
moodle = handleTest ./moodle.nix {};
|
moodle = handleTest ./moodle.nix {};
|
||||||
moonraker = handleTest ./moonraker.nix {};
|
moonraker = handleTest ./moonraker.nix {};
|
||||||
|
morph-browser = handleTest ./morph-browser.nix { };
|
||||||
morty = handleTest ./morty.nix {};
|
morty = handleTest ./morty.nix {};
|
||||||
mosquitto = handleTest ./mosquitto.nix {};
|
mosquitto = handleTest ./mosquitto.nix {};
|
||||||
moosefs = handleTest ./moosefs.nix {};
|
moosefs = handleTest ./moosefs.nix {};
|
||||||
|
|
53
nixos/tests/morph-browser.nix
Normal file
53
nixos/tests/morph-browser.nix
Normal file
|
@ -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")
|
||||||
|
'';
|
||||||
|
})
|
|
@ -3,6 +3,7 @@
|
||||||
, fetchFromGitLab
|
, fetchFromGitLab
|
||||||
, fetchpatch
|
, fetchpatch
|
||||||
, gitUpdater
|
, gitUpdater
|
||||||
|
, nixosTests
|
||||||
, cmake
|
, cmake
|
||||||
, content-hub
|
, content-hub
|
||||||
, gettext
|
, gettext
|
||||||
|
@ -121,7 +122,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
ln -s $out/share/{morph-browser/morph-browser-splash.svg,lomiri-app-launch/splash/morph-browser.svg}
|
ln -s $out/share/{morph-browser/morph-browser-splash.svg,lomiri-app-launch/splash/morph-browser.svg}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru.updateScript = gitUpdater { };
|
passthru = {
|
||||||
|
updateScript = gitUpdater { };
|
||||||
|
tests.standalone = nixosTests.morph-browser;
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Lightweight web browser tailored for Ubuntu Touch";
|
description = "Lightweight web browser tailored for Ubuntu Touch";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user