Update test

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
t3chguy/react18/update
Michael Telatynski 2024-04-22 14:33:21 +01:00
parent fd49787821
commit a033d031b5
No known key found for this signature in database
GPG Key ID: A2B008A5F49F5D0D
1 changed files with 9 additions and 12 deletions

View File

@ -336,22 +336,19 @@ describe("loading:", function () {
});
});
it("shows a home page by default if we have no joined rooms", function () {
it("shows a home page by default if we have no joined rooms", async () => {
localStorage.removeItem("mx_last_room_id");
loadApp();
return awaitLoggedIn(matrixChat!)
.then(() => {
// we are logged in - let the sync complete
return expectAndAwaitSync();
})
.then(() => {
// once the sync completes, we should have a home page
httpBackend.verifyNoOutstandingExpectation();
expect(matrixChat?.container.querySelector(".mx_HomePage")).toBeTruthy();
expect(windowLocation?.hash).toEqual("#/home");
});
await awaitLoggedIn(matrixChat!);
// we are logged in - let the sync complete
await expectAndAwaitSync();
// once the sync completes, we should have a home page
httpBackend.verifyNoOutstandingExpectation();
await waitFor(() => matrixChat?.container.querySelector(".mx_HomePage"));
expect(matrixChat?.container.querySelector(".mx_HomePage")).toBeTruthy();
expect(windowLocation?.hash).toEqual("#/home");
});
it("shows a room view if we followed a room link", function () {