Plugins
Playwright
Plugin for end-to-end testing with Playwright
@bjb-forge/nx-playwright-project
Installation
npx forge add @bjb-forge/nx-playwright-projectPlugin Options
{
"plugin": "@bjb-forge/nx-playwright-project/nx-plugin",
"options": {}
}| Option | Type | Description |
|---|---|---|
e2e.targetName | string | The name of the e2e target |
e2e.ciTargetName | string | The name of the CI e2e target |
lint.targetName | string | The name of the lint target |
Inferred Targets
e2e
Runs end-to-end tests using Playwright.
Condition: All projects with Playwright configuration
lint
Runs ESLint to check code quality.
Condition: All Playwright projects with a package.json
Generators
playwright-project
Create a Playwright e2e testing project
nx g @bjb-forge/nx-playwright-project:playwright-project [options]| Option | Type | Required | Default | Description |
|---|---|---|---|---|
directory | string | Yes | - | A directory where the project is placed. |
name | string | No | - | Project name |
scope | string | No | forge | Import Path Scope |
webServerCommand | string | No | - | Command to start the web server for testing (e.g., 'nx serve my-app') |
webServerAddress | string | No | http://localhost:4200 | URL where the web server will be available |