@puppeteer/ng-schematics

Puppeteer Angular schematics

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@puppeteer/ng-schematics
0.1.04 months ago4 months agoMinified + gzip package size for @puppeteer/ng-schematics in KB

Readme

Puppeteer Angular Schematic
Adds Puppeteer-based e2e tests to your Angular project.

Usage

Run the command bellow in an Angular CLI app directory and follow the prompts. Note this will add the schematic as a dependency to your project.
ng add @puppeteer/ng-schematics

Or you can use the same command followed by the options bellow.
Currently, this schematic supports the following test frameworks:

With the schematics installed you can run E2E tests:
ng e2e

Note: Command spawns it's own server on the same port ng serve does.

Options

When adding schematics to your project you can to provide following options:
| Option | Description | Value | Required | | -------------------- | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | -------- | | --isDefaultTester | When true, replaces default ng e2e command. | boolean | true | | --exportConfig | When true, creates an empty Puppeteer configuration file. (.puppeteerrc.cjs) | boolean | true | | --testingFramework | The testing framework to install along side Puppeteer. | "jasmine", "jest", "mocha", "node" | true |

Contributing

Check out our contributing guide to get an overview of what you need to develop in the Puppeteer repo.

Unit Testing

The schematics utilize @angular-devkit/schematics/testing for verifying correct file creation and package.json updates. To execute the test suit:
npm run test