Skip to content

Commit

Permalink
feat(playwright): support bypass CSP in config (#3641)
Browse files Browse the repository at this point in the history
  • Loading branch information
kobenguyent committed May 21, 2023
1 parent 37c0806 commit fc93349
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/helpers/Playwright.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Type: [object][5]
- `channel` **any?** (While Playwright can operate against the stock Google Chrome and Microsoft Edge browsers available on the machine. In particular, current Playwright version will support Stable and Beta channels of these browsers. See [Google Chrome & Microsoft Edge][37].
- `ignoreLog` **[Array][15]<[string][8]>?** An array with console message types that are not logged to debug log. Default value is `['warning', 'log']`. E.g. you can set `[]` to log all messages. See all possible [values][38].
- `ignoreHTTPSErrors` **[boolean][26]?** Allows access to untrustworthy pages, e.g. to a page with an expired certificate. Default value is `false`
- `bypassCSP` **[boolean][26]?** bypass Content Security Policy or CSP



Expand All @@ -87,7 +88,7 @@ By default, video is saved to `output/video` dir. You can customize this path by

#### Trace Recording Customization

Trace recording provides a complete information on test execution and includes DOM snapshots, screenshots, and network requests logged during run.
Trace recording provides complete information on test execution and includes DOM snapshots, screenshots, and network requests logged during run.
Traces will be saved to `output/trace`

- `trace`: enables trace recording for failed tests; trace are saved into `output/trace` folder
Expand Down
3 changes: 2 additions & 1 deletion lib/helper/Playwright.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ const pathSeparator = path.sep;
* @prop {any} [channel] - (While Playwright can operate against the stock Google Chrome and Microsoft Edge browsers available on the machine. In particular, current Playwright version will support Stable and Beta channels of these browsers. See [Google Chrome & Microsoft Edge](https://playwright.dev/docs/browsers/#google-chrome--microsoft-edge).
* @prop {string[]} [ignoreLog] - An array with console message types that are not logged to debug log. Default value is `['warning', 'log']`. E.g. you can set `[]` to log all messages. See all possible [values](https://playwright.dev/docs/api/class-consolemessage#console-message-type).
* @prop {boolean} [ignoreHTTPSErrors] - Allows access to untrustworthy pages, e.g. to a page with an expired certificate. Default value is `false`
* @prop {boolean} [bypassCSP] - bypass Content Security Policy or CSP
*/
const config = {};

Expand Down Expand Up @@ -125,7 +126,7 @@ const config = {};
*
* #### Trace Recording Customization
*
* Trace recording provides a complete information on test execution and includes DOM snapshots, screenshots, and network requests logged during run.
* Trace recording provides complete information on test execution and includes DOM snapshots, screenshots, and network requests logged during run.
* Traces will be saved to `output/trace`
*
* * `trace`: enables trace recording for failed tests; trace are saved into `output/trace` folder
Expand Down

0 comments on commit fc93349

Please sign in to comment.