1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-09 08:42:50 +03:00

Linkify room topic (#11631)

This commit is contained in:
Germain
2023-09-20 12:51:15 +01:00
committed by GitHub
parent 1c16eab1cd
commit fc9caa3269
3 changed files with 15 additions and 2 deletions

View File

@@ -21,6 +21,7 @@ import {
fireEvent,
getAllByLabelText,
getByLabelText,
getByRole,
getByText,
render,
screen,
@@ -78,7 +79,7 @@ describe("RoomHeader", () => {
});
it("renders the room topic", async () => {
const TOPIC = "Hello World!";
const TOPIC = "Hello World! http://element.io";
const roomTopic = new MatrixEvent({
type: EventType.RoomTopic,
@@ -96,6 +97,7 @@ describe("RoomHeader", () => {
withClientContextRenderOptions(MatrixClientPeg.get()!),
);
expect(container).toHaveTextContent(TOPIC);
expect(getByRole(container, "link")).toHaveTextContent("http://element.io");
});
it("opens the room summary", async () => {