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