Tests for RoomCreate (#9997)

* Tests for RoomCreate tile

* Prefer screen instead of holding the return from render

* use userEvent instead of fireEvent
This commit is contained in:
Andy Balaam
2023-01-27 15:23:23 +00:00
committed by GitHub
parent d84509d8d3
commit 364c453907
3 changed files with 116 additions and 1 deletions

View File

@@ -27,11 +27,15 @@ import EventTileBubble from "./EventTileBubble";
import { ViewRoomPayload } from "../../../dispatcher/payloads/ViewRoomPayload";
interface IProps {
/* the MatrixEvent to show */
/** The m.room.create MatrixEvent that this tile represents */
mxEvent: MatrixEvent;
timestamp?: JSX.Element;
}
/**
* A message tile showing that this room was created as an upgrade of a previous
* room.
*/
export default class RoomCreate extends React.Component<IProps> {
private onLinkClicked = (e: React.MouseEvent): void => {
e.preventDefault();