From 61624d26954a2b72392ad4bf689863ec57e096aa Mon Sep 17 00:00:00 2001 From: Alex Rudenko Date: Wed, 31 Aug 2022 16:10:49 +0200 Subject: [PATCH] chore: fix a flaky test in request interception (#8870) --- test/src/requestinterception.spec.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/src/requestinterception.spec.ts b/test/src/requestinterception.spec.ts index f89332db1b8..bb7e0c03dd6 100644 --- a/test/src/requestinterception.spec.ts +++ b/test/src/requestinterception.spec.ts @@ -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; }); });