From 235f598eba594c3b990712568ad67f63b0e8ab4f Mon Sep 17 00:00:00 2001 From: kobenguyent Date: Mon, 17 Apr 2023 11:14:13 +0200 Subject: [PATCH] feat(playwright): support bypass CSP in config --- 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 c892c90f3..5ff529122 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 fbb24ed9d..3ff7ad308 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