diff --git a/README.md b/README.md index 7e9ea52..39d83b3 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,9 @@ Adds [Playwright Test](https://playwright.dev/) to your Angular project -## Add Playwright to your Angular project +## Installation +Run the following to add Playwright to your Angular project ```bash ng add playwright-ng-schematics ``` @@ -16,8 +17,11 @@ Once installed, you can run the tests npm run e2e ``` -## Run tests -You can also use `ng` to run your tests +## Usage + +### Run tests + +You can also use the Angular CLI `ng` to run your tests ```bash ng e2e ``` @@ -29,8 +33,9 @@ ng e2e --ui For a list of accepted arguments, use `ng e2e --help`. If you need more options and control on the CLI, the best solution is to use `npx playwright test` directly. -### Run an Angular dev server -If a `devServerTarget` option is specified, the builder will launch an Angular server and will set `PLAYWRIGHT_TEST_BASE_URL` environment variable automatically. +### Start an Angular development server + +If a `devServerTarget` option is specified, the builder will launch an Angular server and will automatically set the `PLAYWRIGHT_TEST_BASE_URL` environment variable. ```json title="angular.json" "e2e": { @@ -48,7 +53,7 @@ If a `devServerTarget` option is specified, the builder will launch an Angular s ``` You still can make use of Playwright's `baseURL` option and mix it with `PLAYWRIGHT_TEST_BASE_URL` env variable. -The example below has projects using `PLAYWRIGHT_TEST_BASE_URL` (set by `devServerTarget`) or other base URL. +The example below shows projects using `PLAYWRIGHT_TEST_BASE_URL` (set by `devServerTarget`) or another base URL. ```ts title="playwright.config.ts" // ... @@ -65,7 +70,7 @@ The example below has projects using `PLAYWRIGHT_TEST_BASE_URL` (set by `devServ ] ``` -## Create a test file +### Create a test file Create a new empty test ```bash @@ -74,7 +79,7 @@ ng generate playwright-ng-schematics:e2e "" ## Migrate from Protractor -Read the [Migrating from Protractor](https://playwright.dev/docs/protractor) guide from Playwright official website. +Read the [Migrating from Protractor](https://playwright.dev/docs/protractor) guide on the official Playwright website. ## Contribute @@ -82,4 +87,5 @@ Read the [Migrating from Protractor](https://playwright.dev/docs/protractor) gui - Conventional Commits. NO EMOJI ## License + This project is licensed under an Apache-2.0 license.