at master 672 B view raw
1{ pkgs, ... }: 2{ 3 name = "ladybird"; 4 meta = with pkgs.lib.maintainers; { 5 maintainers = [ fgaz ]; 6 }; 7 8 nodes.machine = 9 { config, pkgs, ... }: 10 { 11 imports = [ 12 ./common/x11.nix 13 ]; 14 15 services.xserver.enable = true; 16 programs.ladybird.enable = true; 17 }; 18 19 enableOCR = true; 20 21 testScript = '' 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}