diff --git a/test/app-tests/loading-test.tsx b/test/app-tests/loading-test.tsx index dd4a3e70d..7cbe650c5 100644 --- a/test/app-tests/loading-test.tsx +++ b/test/app-tests/loading-test.tsx @@ -626,7 +626,7 @@ describe("loading:", function () { }); // Give the component some time to finish processing the login flows before continuing. - await waitFor(() => matrixChat?.container.querySelector("#mx_LoginForm_username")); + await waitFor(() => expect(matrixChat?.container.querySelector("#mx_LoginForm_username")).toBeTruthy()); // Enter login details fireEvent.change(matrixChat.container.querySelector("#mx_LoginForm_username")!, { target: { value: "user" } });