From fc9334921ad45e403d364c598a628d1b03623b69 Mon Sep 17 00:00:00 2001 From: KobeNguyenT <7845001+kobenguyent@users.noreply.github.com> Date: Sun, 21 May 2023 11:48:25 +0200 Subject: [PATCH] feat(playwright): support bypass CSP in config (#3641) --- docs/helpers/Playwright.md | 3 ++- lib/helper/Playwright.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/helpers/Playwright.md b/docs/helpers/Playwright.md index 7e55a5d23..45aeec26b 100644 --- a/docs/helpers/Playwright.md +++ b/docs/helpers/Playwright.md @@ -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 @@ -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 diff --git a/lib/helper/Playwright.js b/lib/helper/Playwright.js index 2adf24f83..b0f30e715 100644 --- a/lib/helper/Playwright.js +++ b/lib/helper/Playwright.js @@ -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 = {}; @@ -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