04c286d5a0
Bumps [@angular-devkit/schematics](https://github.com/angular/angular-cli) from 15.0.4 to 15.1.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/angular/angular-cli/releases"><code>@angular-devkit/schematics</code>'s releases</a>.</em></p> <blockquote> <h2>v15.1.1</h2> <p><!-- raw HTML omitted --><!-- raw HTML omitted --></p> <h1>15.1.1 (2023-01-12)</h1> <h3><code>@angular-devkit/build-angular</code></h3> <table> <thead> <tr> <th>Commit</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><a href=" |
||
---|---|---|
.. | ||
src | ||
test/src | ||
.eslintignore | ||
.gitignore | ||
.mocharc.cjs | ||
CHANGELOG.md | ||
copySchemaFiles.js | ||
package-lock.json | ||
package.json | ||
README.md | ||
tsconfig.json | ||
tsconfig.spec.json |
Puppeteer Angular Schematic
Adds Puppeteer-based e2e tests to your Angular project.
Usage
Run the command below 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 below.
Currently, this schematic supports the following test frameworks:
- Jasmine [https://jasmine.github.io/]
- Jest [https://jestjs.io/]
- Mocha [https://mochajs.org/]
- Node Test Runner (Experimental) [https://nodejs.org/api/test.html]
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