tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
nixosTests.morph-browser: Migrate to runTest
OPNA2608
1 year ago
5d371953
de76a1e8
+44
-46
2 changed files
expand all
collapse all
unified
split
nixos
tests
all-tests.nix
morph-browser.nix
+1
-1
nixos/tests/all-tests.nix
reviewed
···
725
725
moodle = handleTest ./moodle.nix {};
726
726
moonraker = handleTest ./moonraker.nix {};
727
727
mopidy = handleTest ./mopidy.nix {};
728
728
-
morph-browser = handleTest ./morph-browser.nix { };
728
728
+
morph-browser = runTest ./morph-browser.nix;
729
729
morty = handleTest ./morty.nix {};
730
730
mosquitto = handleTest ./mosquitto.nix {};
731
731
moosefs = handleTest ./moosefs.nix {};
+43
-45
nixos/tests/morph-browser.nix
reviewed
···
1
1
-
import ./make-test-python.nix (
2
2
-
{ pkgs, lib, ... }:
3
3
-
{
4
4
-
name = "morph-browser-standalone";
5
5
-
meta.maintainers = lib.teams.lomiri.members;
1
1
+
{ pkgs, lib, ... }:
2
2
+
{
3
3
+
name = "morph-browser-standalone";
4
4
+
meta.maintainers = lib.teams.lomiri.members;
6
5
7
7
-
nodes.machine =
8
8
-
{ config, pkgs, ... }:
9
9
-
{
10
10
-
imports = [
11
11
-
./common/x11.nix
12
12
-
];
6
6
+
nodes.machine =
7
7
+
{ config, pkgs, ... }:
8
8
+
{
9
9
+
imports = [
10
10
+
./common/x11.nix
11
11
+
];
13
12
14
14
-
services.xserver.enable = true;
13
13
+
services.xserver.enable = true;
15
14
16
16
-
environment = {
17
17
-
systemPackages = with pkgs.lomiri; [
18
18
-
suru-icon-theme
19
19
-
morph-browser
20
20
-
];
21
21
-
variables = {
22
22
-
UITK_ICON_THEME = "suru";
23
23
-
};
15
15
+
environment = {
16
16
+
systemPackages = with pkgs.lomiri; [
17
17
+
suru-icon-theme
18
18
+
morph-browser
19
19
+
];
20
20
+
variables = {
21
21
+
UITK_ICON_THEME = "suru";
24
22
};
23
23
+
};
25
24
26
26
-
i18n.supportedLocales = [ "all" ];
25
25
+
i18n.supportedLocales = [ "all" ];
27
26
28
28
-
fonts.packages = with pkgs; [
29
29
-
# Intended font & helps with OCR
30
30
-
ubuntu-classic
31
31
-
];
32
32
-
};
27
27
+
fonts.packages = with pkgs; [
28
28
+
# Intended font & helps with OCR
29
29
+
ubuntu-classic
30
30
+
];
31
31
+
};
33
32
34
34
-
enableOCR = true;
33
33
+
enableOCR = true;
35
34
36
36
-
testScript = ''
37
37
-
machine.wait_for_x()
35
35
+
testScript = ''
36
36
+
machine.wait_for_x()
38
37
39
39
-
with subtest("morph browser launches"):
40
40
-
machine.execute("morph-browser >&2 &")
41
41
-
machine.wait_for_text(r"Web Browser|New|sites|Bookmarks")
42
42
-
machine.screenshot("morph_open")
38
38
+
with subtest("morph browser launches"):
39
39
+
machine.execute("morph-browser >&2 &")
40
40
+
machine.wait_for_text(r"Web Browser|New|sites|Bookmarks")
41
41
+
machine.screenshot("morph_open")
43
42
44
44
-
with subtest("morph browser displays HTML"):
45
45
-
machine.send_chars("file://${pkgs.valgrind.doc}/share/doc/valgrind/html/index.html\n")
46
46
-
machine.wait_for_text("Valgrind Documentation")
47
47
-
machine.screenshot("morph_htmlcontent")
43
43
+
with subtest("morph browser displays HTML"):
44
44
+
machine.send_chars("file://${pkgs.valgrind.doc}/share/doc/valgrind/html/index.html\n")
45
45
+
machine.wait_for_text("Valgrind Documentation")
46
46
+
machine.screenshot("morph_htmlcontent")
48
47
49
49
-
machine.succeed("pkill -f morph-browser")
48
48
+
machine.succeed("pkill -f morph-browser")
50
49
51
51
-
with subtest("morph browser localisation works"):
52
52
-
machine.execute("env LANG=de_DE.UTF-8 morph-browser >&2 &")
53
53
-
machine.wait_for_text(r"Web-Browser|Neuer|Seiten|Lesezeichen")
54
54
-
machine.screenshot("morph_localised")
55
55
-
'';
56
56
-
}
57
57
-
)
50
50
+
with subtest("morph browser localisation works"):
51
51
+
machine.execute("env LANG=de_DE.UTF-8 morph-browser >&2 &")
52
52
+
machine.wait_for_text(r"Web-Browser|Neuer|Seiten|Lesezeichen")
53
53
+
machine.screenshot("morph_localised")
54
54
+
'';
55
55
+
}