Skip to content

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

fix(tests): correct timeout duration in clock pause test (#35522)

Max Schmitt9cb05c56f574
diff --git a/tests/library/page-clock.spec.ts b/tests/library/page-clock.spec.ts
index a660e5e8a4..1ce5f2278f 100644
--- a/tests/library/page-clock.spec.ts
+++ b/tests/library/page-clock.spec.ts
@@ -437,8 +437,8 @@ it.describe('while running', () => {
await page.clock.install({ time: 0 });
await page.goto('data:text/html,');
await page.clock.pauseAt(1000);
- await page.waitForTimeout(1000);
- await page.clock.resume();
+ // Internally wait to make sure the clock is paused and not running.
+ await page.waitForTimeout(1111);
const now = await page.evaluate(() => Date.now());
expect(now).toBeGreaterThanOrEqual(0);
expect(now).toBeLessThanOrEqual(1000);