@bigbinary/neeto-playwright-commons 1.8.16 → 1.8.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +2 -2
- package/index.cjs.js.map +1 -1
- package/index.d.ts +2 -1
- package/index.js +2 -2
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -193,12 +193,12 @@ const COMMON_SELECTORS = {
|
|
|
193
193
|
|
|
194
194
|
class CustomCommands {
|
|
195
195
|
constructor(page, request, baseURL = process.env.BASE_URL) {
|
|
196
|
-
this.interceptMultipleResponses = ({ responseUrl = "", times = 1, baseUrl, customPageContext, timeout = 35000, } = {}) => {
|
|
196
|
+
this.interceptMultipleResponses = ({ responseUrl = "", responseStatus = 200, times = 1, baseUrl, customPageContext, timeout = 35000, } = {}) => {
|
|
197
197
|
const pageContext = customPageContext !== null && customPageContext !== void 0 ? customPageContext : this.page;
|
|
198
198
|
return Promise.all([...new Array(times)].map(() => pageContext.waitForResponse((response) => {
|
|
199
199
|
var _a, _b, _c;
|
|
200
200
|
if (response.request().resourceType() === "xhr" &&
|
|
201
|
-
response.status() ===
|
|
201
|
+
response.status() === responseStatus &&
|
|
202
202
|
response.url().includes(responseUrl) &&
|
|
203
203
|
response.url().startsWith((_a = baseUrl !== null && baseUrl !== void 0 ? baseUrl : this.baseURL) !== null && _a !== void 0 ? _a : "") &&
|
|
204
204
|
!this.responses.includes((_b = response.headers()) === null || _b === void 0 ? void 0 : _b["x-request-id"])) {
|