Forge
Plugins

Playwright

Plugin for end-to-end testing with Playwright

@bjb-forge/nx-playwright-project

Installation

npx forge add @bjb-forge/nx-playwright-project

Plugin Options

{
  "plugin": "@bjb-forge/nx-playwright-project/nx-plugin",
  "options": {}
}
OptionTypeDescription
e2e.targetNamestringThe name of the e2e target
e2e.ciTargetNamestringThe name of the CI e2e target
lint.targetNamestringThe 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]
OptionTypeRequiredDefaultDescription
directorystringYes-A directory where the project is placed.
namestringNo-Project name
scopestringNoforgeImport Path Scope
webServerCommandstringNo-Command to start the web server for testing (e.g., 'nx serve my-app')
webServerAddressstringNohttp://localhost:4200URL where the web server will be available

On this page