This seems to be causing a lot of weirdness, presumably because there's
another missing thing like in #135, but I don't know what it might be and
it feels like it might take a while to find. Backing these changes out
to fix develop while we sort it out.

Fixes https://github.com/element-hq/element-web/issues/28179
This commit is contained in:
David Baker 2024-10-10 15:08:43 +01:00 committed by GitHub
parent 4e5cf1b720
commit 3a59556749
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 78 additions and 88 deletions

View file

@ -167,7 +167,7 @@ describe("WidgetLayoutStore", () => {
it("should recalculate all rooms when the client is ready", async () => {
mocked(client.getVisibleRooms).mockReturnValue([mockRoom]);
await store.start(client);
await store.start();
expect(roomUpdateListener).toHaveBeenCalled();
expect(store.getContainerWidgets(mockRoom, Container.Top)).toEqual([]);
@ -243,7 +243,7 @@ describe("WidgetLayoutStore", () => {
});
it("should copy the layout to the room", async () => {
await store.start(client);
await store.start();
store.recalculateRoom(mockRoom);
store.moveToContainer(mockRoom, mockApps[0], Container.Top);
store.copyLayoutToRoom(mockRoom);
@ -297,7 +297,7 @@ describe("WidgetLayoutStore", () => {
mocked(client.getVisibleRooms).mockReturnValue([]);
// @ts-ignore bypass private ctor for tests
const store = new WidgetLayoutStore();
await store.start(client);
await store.start();
expect(client.getVisibleRooms).toHaveBeenCalledWith(false);
});
});
@ -314,7 +314,7 @@ describe("WidgetLayoutStore", () => {
mocked(client.getVisibleRooms).mockReturnValue([]);
// @ts-ignore bypass private ctor for tests
const store = new WidgetLayoutStore();
await store.start(client);
await store.start();
expect(client.getVisibleRooms).toHaveBeenCalledWith(true);
});
});