Skip to content

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

test(ui-mode): ignore HMR websockets in leak test (#40415)

Pavel Feldman2778820c2069
diff --git a/tests/playwright-test/ui-mode-test-run.spec.ts b/tests/playwright-test/ui-mode-test-run.spec.ts
index 14094e98cb..724a8eb351 100644
--- a/tests/playwright-test/ui-mode-test-run.spec.ts
+++ b/tests/playwright-test/ui-mode-test-run.spec.ts
@@ -787,12 +787,12 @@ test('should not leak websocket connections', {
});
const [ws1] = await Promise.all([
- page.waitForEvent('websocket'),
+ page.waitForEvent('websocket', w => !w.url().includes('hmr')),
page.getByTitle('Reload').click(),
]);
await Promise.all([
- page.waitForEvent('websocket'),
+ page.waitForEvent('websocket', w => !w.url().includes('hmr')),
page.getByTitle('Reload').click(),
]);