Skip to content

Commit

Permalink
fix(docs): add test:e2e:playwright to test:e2e task and revert RE…
Browse files Browse the repository at this point in the history
…ADME code snippet type change
  • Loading branch information
Ciprian Ivanov committed Feb 5, 2021
1 parent 79bb59d commit c894832
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The best place to look for usage examples is the [e2e test suite](https://github

Import the `authenticator-browser-extension` in the [`wdio.conf.js`](https://webdriver.io/docs/options.html) file and add `Authenticator` to the list of Chrome extensions:

```typescript
```javascript
// wdio.conf.js

const { Authenticator } = require('authenticator-browser-extension');
Expand All @@ -72,7 +72,7 @@ exports.config = {

Import the `authenticator-browser-extension` in the [`protractor.conf.js`](https://www.protractortest.org/#/api-overview#example-config-file) file and add `Authenticator` to the list of Chrome extensions:

```typescript
```javascript
// protractor.conf.js

const { Authenticator } = require('authenticator-browser-extension');
Expand All @@ -98,6 +98,7 @@ exports.config = {
Import the `authenticator-browser-extension` and generate an expanded `Authenticator` web extension directory before launching a Puppeteer browser:

```typescript
// puppeteer/chrome-authenticator-extension.spec.ts
const { Authenticator } = require('authenticator-browser-extension');

const authenticator = Authenticator.for('admin', 'Password123')
Expand All @@ -119,6 +120,7 @@ browser = await puppeteer.launch({
Requires launching a [persistent browser context instance](https://playwright.dev/docs/api/class-browsertype?_highlight=persistent#browsertypelaunchpersistentcontextuserdatadir-options) containing the `Authenticator` extension. In every other way a carbon copy of the Puppeteer prototype.

```typescript
// playwright/chrome-authenticator-extension.spec.ts
const extensionDirectory = `${process.cwd()}/build/playwright/authenticator`;

const authenticator = Authenticator.for(
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"lint:fix": "eslint . --ext ts --fix",
"compile": "tsc --project tsconfig.json",
"test:spec": "nyc --report-dir ./reports/coverage mocha --require ts-node/register --reporter spec 'spec/**/*.spec.ts'",
"test:e2e": "npm run test:e2e:protractor && npm run test:e2e:wdio && npm run test:e2e:puppeteer",
"test:e2e": "npm run test:e2e:protractor && npm run test:e2e:wdio && npm run test:e2e:puppeteer && npm run test:e2e:playwright",
"test:e2e:protractor": "protractor e2e/protractor/protractor.conf.js",
"test:e2e:wdio": "wdio e2e/webdriverio/wdio.conf.js",
"test:e2e:playwright": "mocha --require ts-node/register --reporter spec e2e/playwright/chrome-authenticator-extension.spec.ts",
Expand Down

0 comments on commit c894832

Please sign in to comment.