Skip to content

Commit

Permalink
WIP: NixOS test for geckodriver
Browse files Browse the repository at this point in the history
  • Loading branch information
das-g committed Jan 8, 2019
1 parent fc09fcb commit fc5663a
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions nixos/tests/geckodriver.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import ./make-test.nix {

machine =
{ config, pkgs, ... }:
{
imports = [ ./common/x11.nix ];

environment.systemPackages = with pkgs; [
(
python3.withPackages(
ps : [
ps.selenium
]
)
)
geckodriver
firefox
];
};

testScript =
let
pythonScript =
''
from selenium import webdriver
webdriver.Firefox()
'';
in
''
$machine->waitForX;
subtest "selenium can launch Firefox", sub {
$machine->succeed("python3 -c '${pythonScript}'");
$machine->screenshot("Firefox");
};
'';
}

0 comments on commit fc5663a

Please sign in to comment.