Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
@mands/nx-playwright
Advanced tools
[![MIT License](https://img.shields.io/github/license/marksandspencer/nx-plugins)](https://github.com/marksandspencer/nx-plugins/blob/main/LICENSE.md) ![Build](https://github.com/marksandspencer/nx-plugins/actions/workflows/release.yml/badge.svg) [![npm v
An Nx plugin that adds Playwright end-to-end testing using a native runner to your NX workspace.
Note Don't forget to replace the placeholder
<APP-NAME>
yarn add --dev @mands/nx-playwright
yarn playwright install --with-deps
Warning If you have an existing e2e test app, please remove it first
yarn nx generate remove <APP-NAME>-e2e
yarn nx generate @mands/nx-playwright:project <APP-NAME>-e2e --project <APP-NAME>
yarn nx e2e <APP-NAME>-e2e
nx-playwright
has some flags that you can utilize at execution time
--browser=BROWSER_TYPE
: allowed browser types being chromium
, firefox
or webkit
(or an all
type to execute against all 3 types)--format=FORMAT_TYPE
: this allows values such as json
or html
--headed
: launches the browser in non-headless mode--debug
: runs tests in a browser plus another interactive debugger window that you can pause/play tests--packageRunner
: package runner to use for running playwright (npx
, pnpm
, or yarn
). Defaults to yarn
--path
: path to run tests at. Defaults to src
--skipServe
: skips the execution of a devServer--timeout=<number>
: adds a timeout for your tests in milliseconds--grep=<RegExp|Array<RegExp>>
: filter to only run tests with a title matching one of the patterns--grep-invert=<RegExp|Array<RegExp>>
: filter to only run tests with a title not matching one of the patternsNote These flags can also be used in
project.json
ornx.json
These flags align with the standard playwright flags, as well as the nx-cypress ones.
Create a new Nx workspace containing one application. Then run, in the root of this repo:
./local-test.sh -w path/to/workspace -a app-name
⚠️ The flag -C
can optionally be used to reverse any changes made to the workspace during the test run.
However, this is a potentially destructive operation that performs a stash save before the run and
a stash pop at the end of the run.
git clone git@github.com:marksandspencer/nx-plugins.git
# Create a test workspace and app, and remove the e2e app
yarn create nx-workspace --name=test-nx --appName=test-app --style=@emotion/styled --preset=next --nxCloud=false --interactive=false
pushd test-nx
yarn nx generate remove test-app-e2e
git commit -am "Remove test-app-e2e"
popd
# Run the test script
pushd nx-plugins
./local-test.sh -w ../test-nx -a test-app -C
popd
FAQs
[![MIT License](https://img.shields.io/github/license/marksandspencer/nx-plugins)](https://github.com/marksandspencer/nx-plugins/blob/main/LICENSE.md) ![Build](https://github.com/marksandspencer/nx-plugins/actions/workflows/release.yml/badge.svg) [![npm v
The npm package @mands/nx-playwright receives a total of 8,239 weekly downloads. As such, @mands/nx-playwright popularity was classified as popular.
We found that @mands/nx-playwright demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.