Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(playwright): support bypass CSP in config #3641

Merged
merged 1 commit into from
May 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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