You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-31 13:44:28 +03:00
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:
@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user