mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-25 11:13:41 +00:00
Support Matrix 1.1 (drop legacy r0 versions) (#9819)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -288,7 +288,7 @@ describe("Read receipts", () => {
|
||||
cy.intercept({
|
||||
method: "POST",
|
||||
url: new RegExp(
|
||||
`http://localhost:\\d+/_matrix/client/r0/rooms/${uriEncodedOtherRoomId}/receipt/m\\.read/.+`,
|
||||
`http://localhost:\\d+/_matrix/client/v3/rooms/${uriEncodedOtherRoomId}/receipt/m\\.read/.+`,
|
||||
),
|
||||
}).as("receiptRequest");
|
||||
|
||||
@@ -321,7 +321,7 @@ describe("Read receipts", () => {
|
||||
|
||||
cy.intercept({
|
||||
method: "POST",
|
||||
url: new RegExp(`http://localhost:\\d+/_matrix/client/r0/rooms/${uriEncodedOtherRoomId}/read_markers`),
|
||||
url: new RegExp(`http://localhost:\\d+/_matrix/client/v3/rooms/${uriEncodedOtherRoomId}/read_markers`),
|
||||
}).as("readMarkersRequest");
|
||||
|
||||
cy.findByRole("button", { name: "Jump to first unread message." }).click();
|
||||
@@ -341,7 +341,7 @@ describe("Read receipts", () => {
|
||||
|
||||
cy.intercept({
|
||||
method: "POST",
|
||||
url: new RegExp(`http://localhost:\\d+/_matrix/client/r0/rooms/${uriEncodedOtherRoomId}/read_markers`),
|
||||
url: new RegExp(`http://localhost:\\d+/_matrix/client/v3/rooms/${uriEncodedOtherRoomId}/read_markers`),
|
||||
}).as("readMarkersRequest");
|
||||
|
||||
cy.findByRole("button", { name: "Scroll to most recent messages" }).click();
|
||||
|
||||
@@ -704,14 +704,14 @@ describe("Timeline", () => {
|
||||
});
|
||||
|
||||
it("should render url previews", () => {
|
||||
cy.intercept("**/_matrix/media/r0/thumbnail/matrix.org/2022-08-16_yaiSVSRIsNFfxDnV?*", {
|
||||
cy.intercept("**/_matrix/media/v3/thumbnail/matrix.org/2022-08-16_yaiSVSRIsNFfxDnV?*", {
|
||||
statusCode: 200,
|
||||
fixture: "riot.png",
|
||||
headers: {
|
||||
"Content-Type": "image/png",
|
||||
},
|
||||
}).as("mxc");
|
||||
cy.intercept("**/_matrix/media/r0/preview_url?url=https%3A%2F%2Fcall.element.io%2F&ts=*", {
|
||||
cy.intercept("**/_matrix/media/v3/preview_url?url=https%3A%2F%2Fcall.element.io%2F&ts=*", {
|
||||
statusCode: 200,
|
||||
body: {
|
||||
"og:title": "Element Call",
|
||||
|
||||
@@ -62,7 +62,7 @@ declare global {
|
||||
Cypress.Commands.add(
|
||||
"loginUser",
|
||||
(homeserver: HomeserverInstance, username: string, password: string): Chainable<UserCredentials> => {
|
||||
const url = `${homeserver.baseUrl}/_matrix/client/r0/login`;
|
||||
const url = `${homeserver.baseUrl}/_matrix/client/v3/login`;
|
||||
return cy
|
||||
.request<{
|
||||
access_token: string;
|
||||
|
||||
Reference in New Issue
Block a user