summaryrefslogtreecommitdiffstats
path: root/nixos
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-09-30 14:46:51 +0200
committerGitHub <noreply@github.com>2022-09-30 14:46:51 +0200
commitc1487a18d133ff8c15b674130c618c128ba7b4fe (patch)
tree6080e0b358d1cbbf615cfd10ed669b2cf4a90075 /nixos
parent8039b055f8ef0693724a9909145f3daf5d762da5 (diff)
parent75ae3f6d569ec8177c5b70fdddb334c76cc19e8e (diff)
Merge pull request #186990 from fgaz/ladybird/2022-08-14
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/all-tests.nix1
-rw-r--r--nixos/tests/ladybird.nix30
2 files changed, 31 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index 011d7b11b4f8..5687a5332826 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -317,6 +317,7 @@ in {
ksm = handleTest ./ksm.nix {};
kthxbye = handleTest ./kthxbye.nix {};
kubernetes = handleTestOn ["x86_64-linux"] ./kubernetes {};
+ ladybird = handleTest ./ladybird.nix {};
languagetool = handleTest ./languagetool.nix {};
latestKernel.login = handleTest ./login.nix { latestKernel = true; };
leaps = handleTest ./leaps.nix {};
diff --git a/nixos/tests/ladybird.nix b/nixos/tests/ladybird.nix
new file mode 100644
index 000000000000..4e9ab9a36d13
--- /dev/null
+++ b/nixos/tests/ladybird.nix
@@ -0,0 +1,30 @@
+import ./make-test-python.nix ({ pkgs, ... }: {
+ name = "ladybird";
+ meta = with pkgs.lib.maintainers; {
+ maintainers = [ fgaz ];
+ };
+
+ nodes.machine = { config, pkgs, ... }: {
+ imports = [
+ ./common/x11.nix
+ ];
+
+ services.xserver.enable = true;
+ environment.systemPackages = [
+ pkgs.ladybird
+ ];
+ };
+
+ enableOCR = true;
+
+ testScript =
+ ''
+ machine.wait_for_x()
+ machine.succeed("echo '<!DOCTYPE html><html><body><h1>Hello world</h1></body></html>' > page.html")
+ machine.execute("ladybird file://$(pwd)/page.html >&2 &")
+ machine.wait_for_window("Ladybird")
+ machine.sleep(5)
+ machine.wait_for_text("Hello world")
+ machine.screenshot("screen")
+ '';
+})