Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Use stable endpoints for MSC3916 (#12602)
Browse files Browse the repository at this point in the history
  • Loading branch information
turt2live authored Jun 13, 2024
1 parent 8c49f3f commit 6a44f5e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions playwright/e2e/timeline/timeline.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1199,10 +1199,10 @@ test.describe("Timeline", () => {

// Install our mocks and preventative measures
await context.route("**/_matrix/client/versions", async (route) => {
// Force enable MSC3916, which may require the service worker's internal cache to be cleared later.
// Force enable MSC3916/Matrix 1.11, which may require the service worker's internal cache to be cleared later.
const json = await (await route.fetch()).json();
if (!json["unstable_features"]) json["unstable_features"] = {};
json["unstable_features"]["org.matrix.msc3916"] = true;
if (!json["versions"]) json["versions"] = [];
json["versions"].push("v1.11");
await route.fulfill({ json });
});
await context.route("**/_matrix/media/*/download/**", async (route) => {
Expand All @@ -1219,14 +1219,14 @@ test.describe("Timeline", () => {
json: { errcode: "M_UNKNOWN", error: "Unexpected route called." },
});
});
await context.route("**/_matrix/client/unstable/org.matrix.msc3916/download/**", async (route) => {
await context.route("**/_matrix/client/v1/download/**", async (route) => {
expect(route.request().headers()["Authorization"]).toBeDefined();
// we can't use route.continue() because no configured homeserver supports MSC3916 yet
await route.fulfill({
body: NEW_AVATAR,
});
});
await context.route("**/_matrix/client/unstable/org.matrix.msc3916/thumbnail/**", async (route) => {
await context.route("**/_matrix/client/v1/thumbnail/**", async (route) => {
expect(route.request().headers()["Authorization"]).toBeDefined();
// we can't use route.continue() because no configured homeserver supports MSC3916 yet
await route.fulfill({
Expand Down

0 comments on commit 6a44f5e

Please sign in to comment.