1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-30 02:21:17 +03:00

Iterate video room designs in labs (#8499)

* Remove blank header from video room view frame

* Add video room option to space context menu

* Remove duplicate tooltips from face piles

* Factor RoomInfoLine out of SpaceRoomView

* Factor RoomPreviewCard out of SpaceRoomView

* Adapt RoomPreviewCard for video rooms

* "New video room" → "Video room"

* Add comment about unused cases in RoomPreviewCard

* Make widgets in video rooms mutable again to de-risk future upgrades

* Ensure that the video channel exists when mounting VideoRoomView
This commit is contained in:
Robin
2022-05-04 17:02:06 -04:00
committed by GitHub
parent cda31136b9
commit 658ff4dfe6
20 changed files with 617 additions and 434 deletions

View File

@ -37,35 +37,21 @@ describe("createRoom", () => {
setupAsyncStoreWithClient(WidgetStore.instance, client);
jest.spyOn(WidgetUtils, "waitForRoomWidget").mockResolvedValue();
const userId = client.getUserId();
const roomId = await createRoom({ roomType: RoomType.ElementVideo });
const [[{
power_level_content_override: {
users: {
[userId]: userPower,
},
events: {
"im.vector.modular.widgets": widgetPower,
[VIDEO_CHANNEL_MEMBER]: videoMemberPower,
},
events: { [VIDEO_CHANNEL_MEMBER]: videoMemberPower },
},
}]] = mocked(client.createRoom).mock.calls as any;
}]] = mocked(client.createRoom).mock.calls as any; // no good type
const [[widgetRoomId, widgetStateKey, , widgetId]] = mocked(client.sendStateEvent).mock.calls;
// We should have had enough power to be able to set up the Jitsi widget
expect(userPower).toBeGreaterThanOrEqual(widgetPower);
// and should have actually set it up
// We should have set up the Jitsi widget
expect(widgetRoomId).toEqual(roomId);
expect(widgetStateKey).toEqual("im.vector.modular.widgets");
expect(widgetId).toEqual(VIDEO_CHANNEL);
// All members should be able to update their connected devices
expect(videoMemberPower).toEqual(0);
// Jitsi widget should be immutable for admins
expect(widgetPower).toBeGreaterThan(100);
// and we should have been reset back to admin
expect(client.setPowerLevel).toHaveBeenCalledWith(roomId, userId, 100, undefined);
});
});