fix tests

This commit is contained in:
Simon Knott 2025-01-28 17:29:41 +01:00
parent 805d307292
commit 2d4b8a8c7a
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC
2 changed files with 3 additions and 1 deletions

View file

@ -568,6 +568,8 @@ export class Page extends ChannelOwner<channels.PageChannel> implements api.Page
private async _updateInterceptionPatterns() {
const patterns = RouteHandler.prepareInterceptionPatterns(this._routes);
await this._channel.setNetworkInterceptionPatterns({ patterns });
// TODO: merge this with browserContext patterns
await this._browserContext._mockingProxy?.setInterceptionPatterns({ patterns });
}
private async _updateWebSocketInterceptionPatterns() {

View file

@ -110,7 +110,7 @@ test('all properties are populated', async ({ runInlineTest, server, request })
expect(await response.finished()).toBe(null);
expect(request.serviceWorker()).toBe(null);
expect(request.frame()).toBe(null); // we know the page, but not the frame
expect(() => request.frame()).toThrowError("Assertion error"); // we know the page, but not the frame. should probably improve the error message
expect(request.failure()).toBe(null);
expect(request.isNavigationRequest()).toBe(false);