From 9042c2922210f2aed33baa5f39023ba36fe64ac6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Apr 2026 09:47:48 +0000 Subject: [PATCH] test: assert loading UI in RoomPage loading tests Agent-Logs-Url: https://github.com/element-hq/element-call/sessions/568f506e-069d-427d-af4d-99481de9cf22 Co-authored-by: BillCarsonFr <9841565+BillCarsonFr@users.noreply.github.com> --- src/room/RoomPage.test.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/room/RoomPage.test.tsx b/src/room/RoomPage.test.tsx index 65d15a8d..dc96bfd7 100644 --- a/src/room/RoomPage.test.tsx +++ b/src/room/RoomPage.test.tsx @@ -205,6 +205,11 @@ describe("RoomPage", () => { await waitFor(() => { expect(mockRegisterPasswordlessUser).toHaveBeenCalledWith("Bob"); }); + + expect( + screen.getByRole("heading", { name: /loading|common\.loading/i }), + ).toBeInTheDocument(); + expect(screen.queryByText("RoomAuthView Mock")).not.toBeInTheDocument(); }); }); @@ -411,8 +416,9 @@ describe("RoomPage", () => { , ); - // The loading state renders with the heading - expect(screen.getByRole("heading")).toBeInTheDocument(); + expect( + screen.getByRole("heading", { name: /loading|common\.loading/i }), + ).toBeInTheDocument(); }); test("shows GroupCallView when call is loaded", () => {