nixpkgs/tests/firefox.nix
Eelco Dolstra 17457297cb Update all legacy-style modules
I.e., modules that use "require = [options]".  Nowadays that should be
written as

  {
    options = { ... };
    config = { ... };
  };

Also, use "imports" instead of "require" in places where we actually
import another module.
2013-09-04 13:05:09 +02:00

22 lines
475 B
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");
'';
}