mirror of
https://github.com/vector-im/element-call.git
synced 2026-06-30 18:02:56 +00:00
Update sfu-reconnect-bug.spec.ts
This commit is contained in:
@@ -6,6 +6,7 @@ Please see LICENSE in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { expect, test } from "@playwright/test";
|
||||
import { logger } from "matrix-js-sdk/lib/logger";
|
||||
|
||||
test("When creator left, avoid reconnect to the same SFU", async ({
|
||||
browser,
|
||||
@@ -88,15 +89,18 @@ test("When creator left, avoid reconnect to the same SFU", async ({
|
||||
await guestCPage.getByRole("radio", { name: "Spotlight" }).check();
|
||||
|
||||
await guestCPage.waitForTimeout(1000);
|
||||
|
||||
if (wsConnectionCount === 2) {
|
||||
logger.warn("wsConnectionCount is 2, expecting 1 after join")
|
||||
}
|
||||
const wsConnectionCountBeforeLeave = wsConnectionCount;
|
||||
// ========
|
||||
// the creator leaves the call
|
||||
await creatorPage.getByTestId("incall_leave").click();
|
||||
|
||||
// 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);
|
||||
expect(wsConnectionCount).toBe(wsConnectionCountBeforeLeave);
|
||||
// Wait a bit to be sure that if there was a reconnect, it would have happened by now
|
||||
await guestCPage.waitForTimeout(6000);
|
||||
expect(wsConnectionCount).toBe(1);
|
||||
expect(wsConnectionCount).toBe(wsConnectionCountBeforeLeave);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user