chore: fix a flaky test in request interception (#8870)

This commit is contained in:
Alex Rudenko 2022-08-31 16:10:49 +02:00 committed by GitHub
parent 6e9a47a6fa
commit 61624d2695
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -615,10 +615,11 @@ describe('request interception', function () {
return request.continue();
});
await page.goto(server.PREFIX + '/cached/one-style-font.html');
await page.waitForResponse(r => {
const responsePromise = page.waitForResponse(r => {
return r.url().endsWith('/one-style.woff');
});
await page.goto(server.PREFIX + '/cached/one-style-font.html');
await responsePromise;
});
});