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:
parent
40442508de
commit
d94808a197
5 changed files with 8 additions and 76 deletions
|
@ -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!";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue