fix(runner): hide APIResponse.* calls from results (#34909)
This commit is contained in:
parent
81855d11e4
commit
9e38473309
|
|
@ -338,6 +338,7 @@ export class APIResponse implements api.APIResponse {
|
||||||
}
|
}
|
||||||
|
|
||||||
async body(): Promise<Buffer> {
|
async body(): Promise<Buffer> {
|
||||||
|
return await this._request._wrapApiCall(async () => {
|
||||||
try {
|
try {
|
||||||
const result = await this._request._channel.fetchResponseBody({ fetchUid: this._fetchUid() });
|
const result = await this._request._channel.fetchResponseBody({ fetchUid: this._fetchUid() });
|
||||||
if (result.binary === undefined)
|
if (result.binary === undefined)
|
||||||
|
|
@ -348,6 +349,7 @@ export class APIResponse implements api.APIResponse {
|
||||||
throw new Error('Response has been disposed');
|
throw new Error('Response has been disposed');
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
}, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
async text(): Promise<string> {
|
async text(): Promise<string> {
|
||||||
|
|
|
||||||
|
|
@ -1520,9 +1520,7 @@ pw:api | browserContext.newPage
|
||||||
test.step |custom step @ a.test.ts:4
|
test.step |custom step @ a.test.ts:4
|
||||||
pw:api | page.route @ a.test.ts:5
|
pw:api | page.route @ a.test.ts:5
|
||||||
pw:api | page.goto(${server.EMPTY_PAGE}) @ a.test.ts:12
|
pw:api | page.goto(${server.EMPTY_PAGE}) @ a.test.ts:12
|
||||||
pw:api | apiResponse.text @ a.test.ts:7
|
|
||||||
expect | expect.toBe @ a.test.ts:8
|
expect | expect.toBe @ a.test.ts:8
|
||||||
pw:api | apiResponse.text @ a.test.ts:9
|
|
||||||
hook |After Hooks
|
hook |After Hooks
|
||||||
fixture | fixture: page
|
fixture | fixture: page
|
||||||
fixture | fixture: context
|
fixture | fixture: context
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue