summary refs log blame commit diff
path: root/nixos/tests/firefox.nix
blob: b42d473b8025f8503946cce3aec9701458657446 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
                                        
 
           

                          
                                     
                                                    



              

                                                                                                

                                                                             

                                     
 
  
import ./make-test.nix ({ pkgs, ... }: {

  machine =
    { config, pkgs, ... }:

    { imports = [ ./common/x11.nix ];
      environment.systemPackages = [ pkgs.firefox ];
    };

  testScript =
    ''
      $machine->waitForX;
      $machine->execute("firefox file://${pkgs.valgrind}/share/doc/valgrind/html/index.html &");
      $machine->waitForWindow(qr/Valgrind/);
      $machine->sleep(40); # wait until Firefox has finished loading the page
      $machine->screenshot("screen");
    '';

})