It would be incredibly cool to be able to run playwright tests as part of nix flake check. The testScript attribute in pkgs.nixosTest is python code and playwright has python driver so it should be somehow possible no ?
but there is no playwright test command in hte python package:
Usage: playwright [options] [command]
-V, --version output the version number
-h, --help display help for command
open [options] [url] open page in browser specified via -b, --browser
codegen [options] [url] open page and generate code for user actions
install [options] [browser...] ensure browsers necessary for this version of Playwright are installed
install-deps [options] [browser...] install dependencies necessary to run browsers (will ask for sudo permissions)
cr [options] [url] open page in Chromium
ff [options] [url] open page in Firefox
wk [options] [url] open page in WebKit
screenshot [options] <url> <filename> capture a page screenshot
pdf [options] <url> <filename> save page as pdf
show-trace [options] [trace...] show trace viewer
help [command] display help for command
what do you use it for ? do you write tests in python ? how do you launch them then ?
I can then do a playwright open nixos.org, but I can’t run tests with npm or run a visual studio code instance for testing with the playwright extension. It always tells me to install the browsers with npx playwright install.