Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

test: fix should poll on interval test (#2180)

Darío Kondratiuk437d1b624756
diff --git a/test/waittask.spec.js b/test/waittask.spec.js
index baedeb1151..03b1ea9f9a 100644
--- a/test/waittask.spec.js
+++ b/test/waittask.spec.js
@@ -50,7 +50,7 @@ describe('Frame.waitForFunction', function() {
}
return Date.now() - window.__startTime;
}, {}, {polling});
- expect(timeDelta).not.toBeLessThan(polling);
+ expect(await timeDelta.jsonValue()).not.toBeLessThan(polling);
});
it('should throw on polling:mutation', async({page, server}) => {
const error = await page.waitForFunction(() => true, {}, {polling: 'mutation'}).catch(e => e);