Default the room header to on (#12803)
* Default the room header to on * Refactor code into helper method Add a method to open/close the room info panel and use it everywhere. * Fix broken tests, update snapshots and screenshots * Update room header tests to make sense with the new header
This commit is contained in:
parent
25fcd6a65f
commit
bb1b7f1fd0
59 changed files with 595 additions and 397 deletions
|
@ -524,35 +524,6 @@ describe("RoomView", () => {
|
|||
expect(asFragment()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
describe("Peeking", () => {
|
||||
beforeEach(() => {
|
||||
// Make room peekable
|
||||
room.currentState.setStateEvents([
|
||||
new MatrixEvent({
|
||||
type: "m.room.history_visibility",
|
||||
state_key: "",
|
||||
content: {
|
||||
history_visibility: "world_readable",
|
||||
},
|
||||
room_id: room.roomId,
|
||||
}),
|
||||
]);
|
||||
});
|
||||
|
||||
it("should show forget room button for non-guests", async () => {
|
||||
mocked(cli.isGuest).mockReturnValue(false);
|
||||
await mountRoomView();
|
||||
|
||||
expect(screen.getByLabelText("Forget room")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("should not show forget room button for guests", async () => {
|
||||
mocked(cli.isGuest).mockReturnValue(true);
|
||||
await mountRoomView();
|
||||
expect(screen.queryByLabelText("Forget room")).not.toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
describe("knock rooms", () => {
|
||||
const client = createTestClient();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue