From 1fb03c82fe30a00b3ac91e64675868c2744d046c Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Fri, 5 May 2023 12:53:12 +0100 Subject: [PATCH] Ensure we actually wait for the login form to appear in loading-test (#25287) --- test/app-tests/loading-test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/app-tests/loading-test.tsx b/test/app-tests/loading-test.tsx index dd4a3e70d5..7cbe650c53 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" } });