From 21b78d6dad696f063cf4fda3005cf18b558c5f62 Mon Sep 17 00:00:00 2001 From: Valere Date: Wed, 22 Apr 2026 19:30:15 +0200 Subject: [PATCH] test something in the reconnect bug --- playwright/sfu-reconnect-bug.spec.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/playwright/sfu-reconnect-bug.spec.ts b/playwright/sfu-reconnect-bug.spec.ts index 9f666f0f..046f623d 100644 --- a/playwright/sfu-reconnect-bug.spec.ts +++ b/playwright/sfu-reconnect-bug.spec.ts @@ -91,8 +91,14 @@ test("When creator left, avoid reconnect to the same SFU", async ({ // the creator leaves the call await creatorPage.getByTestId("incall_leave").click(); - await guestCPage.waitForTimeout(2000); // https://github.com/element-hq/element-call/issues/3344 // The app used to request a new jwt token then to reconnect to the SFU expect(wsConnectionCount).toBe(1); + await expect + .poll(() => wsConnectionCount, { + message: + "Expected only 1 WebSocket connection (no reconnection after creator left)", + timeout: 5000, // Check for 5 seconds that it stays at 1 + }) + .toBe(1); });