mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
nixosTests.morph-browser: Migrate to runTest
This commit is contained in:
parent
de76a1e852
commit
5d371953de
2 changed files with 46 additions and 48 deletions
|
@ -725,7 +725,7 @@ in {
|
|||
moodle = handleTest ./moodle.nix {};
|
||||
moonraker = handleTest ./moonraker.nix {};
|
||||
mopidy = handleTest ./mopidy.nix {};
|
||||
morph-browser = handleTest ./morph-browser.nix { };
|
||||
morph-browser = runTest ./morph-browser.nix;
|
||||
morty = handleTest ./morty.nix {};
|
||||
mosquitto = handleTest ./mosquitto.nix {};
|
||||
moosefs = handleTest ./moosefs.nix {};
|
||||
|
|
|
@ -1,57 +1,55 @@
|
|||
import ./make-test-python.nix (
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
name = "morph-browser-standalone";
|
||||
meta.maintainers = lib.teams.lomiri.members;
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
name = "morph-browser-standalone";
|
||||
meta.maintainers = lib.teams.lomiri.members;
|
||||
|
||||
nodes.machine =
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./common/x11.nix
|
||||
nodes.machine =
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./common/x11.nix
|
||||
];
|
||||
|
||||
services.xserver.enable = true;
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs.lomiri; [
|
||||
suru-icon-theme
|
||||
morph-browser
|
||||
];
|
||||
|
||||
services.xserver.enable = true;
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs.lomiri; [
|
||||
suru-icon-theme
|
||||
morph-browser
|
||||
];
|
||||
variables = {
|
||||
UITK_ICON_THEME = "suru";
|
||||
};
|
||||
variables = {
|
||||
UITK_ICON_THEME = "suru";
|
||||
};
|
||||
|
||||
i18n.supportedLocales = [ "all" ];
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
# Intended font & helps with OCR
|
||||
ubuntu-classic
|
||||
];
|
||||
};
|
||||
|
||||
enableOCR = true;
|
||||
i18n.supportedLocales = [ "all" ];
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_x()
|
||||
fonts.packages = with pkgs; [
|
||||
# Intended font & helps with OCR
|
||||
ubuntu-classic
|
||||
];
|
||||
};
|
||||
|
||||
with subtest("morph browser launches"):
|
||||
machine.execute("morph-browser >&2 &")
|
||||
machine.wait_for_text(r"Web Browser|New|sites|Bookmarks")
|
||||
machine.screenshot("morph_open")
|
||||
enableOCR = true;
|
||||
|
||||
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")
|
||||
testScript = ''
|
||||
machine.wait_for_x()
|
||||
|
||||
machine.succeed("pkill -f morph-browser")
|
||||
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 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")
|
||||
'';
|
||||
}
|
||||
)
|
||||
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")
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue