-
-
Notifications
You must be signed in to change notification settings - Fork 14k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests/morph-browser: Add standalone (non-Lomiri) test
- Loading branch information
Showing
3 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") | ||
''; | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters