You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-08-07 21:23:00 +03:00
Fix issues with the new topic dialog (#8608)
This commit is contained in:
@@ -22,7 +22,23 @@ describe("Linkify", () => {
|
||||
const wrapper = mount(<Linkify>
|
||||
https://perdu.com
|
||||
</Linkify>);
|
||||
expect(wrapper.html()).toBe('<div><a href="https://perdu.com">https://perdu.com</a></div>');
|
||||
expect(wrapper.html()).toBe(
|
||||
"<div><a href=\"https://perdu.com\" class=\"linkified\" target=\"_blank\" rel=\"noreferrer noopener\">"+
|
||||
"https://perdu.com" +
|
||||
"</a></div>",
|
||||
);
|
||||
});
|
||||
|
||||
it("correctly linkifies a room alias", () => {
|
||||
const wrapper = mount(<Linkify>
|
||||
#element-web:matrix.org
|
||||
</Linkify>);
|
||||
expect(wrapper.html()).toBe(
|
||||
"<div>" +
|
||||
"<a href=\"https://matrix.to/#/#element-web:matrix.org\" class=\"linkified\" rel=\"noreferrer noopener\">" +
|
||||
"#element-web:matrix.org" +
|
||||
"</a></div>",
|
||||
);
|
||||
});
|
||||
|
||||
it("changes the root tag name", () => {
|
||||
@@ -55,10 +71,20 @@ describe("Linkify", () => {
|
||||
|
||||
const wrapper = mount(<DummyTest />);
|
||||
|
||||
expect(wrapper.html()).toBe('<div><div><a href="https://perdu.com">https://perdu.com</a></div></div>');
|
||||
expect(wrapper.html()).toBe(
|
||||
"<div><div>" +
|
||||
"<a href=\"https://perdu.com\" class=\"linkified\" target=\"_blank\" rel=\"noreferrer noopener\">" +
|
||||
"https://perdu.com" +
|
||||
"</a></div></div>",
|
||||
);
|
||||
|
||||
wrapper.find('div').at(0).simulate('click');
|
||||
|
||||
expect(wrapper.html()).toBe('<div><div><a href="https://matrix.org">https://matrix.org</a></div></div>');
|
||||
expect(wrapper.html()).toBe(
|
||||
"<div><div>" +
|
||||
"<a href=\"https://matrix.org\" class=\"linkified\" target=\"_blank\" rel=\"noreferrer noopener\">" +
|
||||
"https://matrix.org" +
|
||||
"</a></div></div>",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
@@ -95,6 +95,7 @@ exports[`MLocationBody <MLocationBody> without error renders map correctly 1`] =
|
||||
onBlur={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseLeave={[Function]}
|
||||
onMouseMove={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
tabIndex={0}
|
||||
>
|
||||
|
Reference in New Issue
Block a user