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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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 () => {