Support playwright
Playwright support would be nice.
Currently I'm using:
inputs = {
nix-playwright-browsers.url = "github:voidus/nix-playwright-browsers";
nix-playwright-browsers.inputs = { nixpkgs.follows = "nixpkgs"; };
};
# [...]
devenv.shells.default =
let
browsers = nix-playwright-browsers.packages.${system}.playwright-browsers_v1_47_0;
in
{
packages = with pkgs; [
playwright-driver.browsers
];
env = {
PLAYWRIGHT_NODEJS_PATH = "${pkgs.nodejs}/bin/node";
PLAYWRIGHT_BROWSERS_PATH = "${(browsers)}";
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = 1;
PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS = 1;
};
You shouldn't need this complicated arrangement.
Remove playwright from your packages.json And simply do this:
packages = with pkgs; [
playwright-test
playwright-driver
];
And you have playwright installed with browsers. Just execute
playwright test in the same directory where you would execute the npx script
I'm happy to accept a PR.
You shouldn't need this complicated arrangement.
Remove playwright from your packages.json And simply do this:
packages = with pkgs; [ playwright-test playwright-driver ]; And you have playwright installed with browsers. Just execute
playwright testin the same directory where you would execute the npx script
This should be the only way. I only knew the nix wiki way.