devenv icon indicating copy to clipboard operation
devenv copied to clipboard

Support playwright

Open bbigras opened this issue 1 year ago • 3 comments

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;
            };

bbigras avatar Oct 17 '24 19:10 bbigras

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

rvveber avatar Oct 18 '24 10:10 rvveber

I'm happy to accept a PR.

domenkozar avatar Nov 20 '24 14:11 domenkozar

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

This should be the only way. I only knew the nix wiki way.

skf-funzt avatar Nov 17 '25 10:11 skf-funzt