Make room model mandatory on the RoomHeader (#11355)

* Remove oobData from RoomHeader

It is never used as the RoomHeader is not shown unless a Room model exists

* Make room model mandatory on the RoomHeader
This commit is contained in:
Germain 2023-08-02 16:29:19 +01:00 committed by GitHub
parent 40442508de
commit d94808a197
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 76 deletions

View file

@ -46,28 +46,11 @@ describe("Roomeader", () => {
setCardSpy = jest.spyOn(RightPanelStore.instance, "setCard");
});
it("renders with no props", () => {
const { asFragment } = render(<RoomHeader />);
expect(asFragment()).toMatchSnapshot();
});
it("renders the room header", () => {
const { container } = render(<RoomHeader room={room} />);
expect(container).toHaveTextContent(ROOM_ID);
});
it("display the out-of-band room name", () => {
const OOB_NAME = "My private room";
const { container } = render(
<RoomHeader
oobData={{
name: OOB_NAME,
}}
/>,
);
expect(container).toHaveTextContent(OOB_NAME);
});
it("renders the room topic", async () => {
const TOPIC = "Hello World!";