1import ./make-test-python.nix (
2 { pkgs, ... }:
3 {
4 name = "ladybird";
5 meta = with pkgs.lib.maintainers; {
6 maintainers = [ fgaz ];
7 };
8
9 nodes.machine =
10 { config, pkgs, ... }:
11 {
12 imports = [
13 ./common/x11.nix
14 ];
15
16 services.xserver.enable = true;
17 programs.ladybird.enable = true;
18 };
19
20 enableOCR = true;
21
22 testScript = ''
23 machine.wait_for_x()
24 machine.succeed("echo '<!DOCTYPE html><html><body><h1>Hello world</h1></body></html>' > page.html")
25 machine.execute("Ladybird file://$(pwd)/page.html >&2 &")
26 machine.wait_for_window("Ladybird")
27 machine.sleep(5)
28 machine.wait_for_text("Hello world")
29 machine.screenshot("screen")
30 '';
31 }
32)