Fixes around URL tooltips and in-app matrix.to link handling (#9139)

* Add regression test for tooltipify exposing raw HTML

* Handle m.to links involving children better

* Comments

* Fix mistaken assertion
This commit is contained in:
Michael Telatynski 2022-08-09 15:37:55 +01:00 committed by GitHub
parent 48ae16b5a5
commit e63072e21f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 19 deletions

View file

@ -59,8 +59,9 @@ describe("Pills", () => {
// find the pill in the timeline and click it
cy.get(".mx_EventTile_body .mx_Pill").click();
const localUrl = `/#/room/#${targetLocalpart}:`;
// verify we landed at a sane place
cy.url().should("contain", `/#/room/#${targetLocalpart}:`);
cy.url().should("contain", localUrl);
cy.wait(250); // let the room list settle
@ -69,7 +70,7 @@ describe("Pills", () => {
cy.get(".mx_EventTile_body .mx_Pill .mx_Pill_linkText")
.should("have.css", "pointer-events", "none")
.click({ force: true }); // force is to ensure we bypass pointer-events
cy.url().should("contain", `https://matrix.to/#/#${targetLocalpart}:`);
cy.url().should("contain", localUrl);
});
});
});