1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-09 08:42:50 +03:00

Support Matrix 1.1 (drop legacy r0 versions) (#9819)

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Travis Ralston
2023-08-14 02:25:13 -06:00
committed by GitHub
parent f9e79fd5d6
commit 180fcaa70f
32 changed files with 712 additions and 440 deletions

View File

@@ -71,7 +71,7 @@ describe("Login", function () {
fetchMock.resetHistory();
fetchMock.get("https://matrix.org/_matrix/client/versions", {
unstable_features: {},
versions: [],
versions: ["v1.1"],
});
platform = mockPlatformPeg({
startSingleSignOn: jest.fn(),
@@ -209,7 +209,7 @@ describe("Login", function () {
fetchMock.get("https://server2/_matrix/client/versions", {
unstable_features: {},
versions: [],
versions: ["v1.1"],
});
rerender(getRawComponent("https://server2"));
await waitForElementToBeRemoved(() => screen.queryAllByLabelText("Loading…"));
@@ -359,7 +359,7 @@ describe("Login", function () {
// but server2 is
fetchMock.get("https://server2/_matrix/client/versions", {
unstable_features: {},
versions: [],
versions: ["v1.1"],
});
const { rerender } = render(getRawComponent());
await waitForElementToBeRemoved(() => screen.queryAllByLabelText("Loading…"));

View File

@@ -36,6 +36,7 @@ describe("Registration", function () {
const mockClient = mocked({
registerRequest,
loginFlows: jest.fn(),
getVersions: jest.fn().mockResolvedValue({ versions: ["v1.1"] }),
} as unknown as MatrixClient);
beforeEach(function () {
@@ -59,7 +60,7 @@ describe("Registration", function () {
});
fetchMock.get("https://matrix.org/_matrix/client/versions", {
unstable_features: {},
versions: [],
versions: ["v1.1"],
});
mockPlatformPeg({
startSingleSignOn: jest.fn(),
@@ -125,7 +126,7 @@ describe("Registration", function () {
fetchMock.get("https://server2/_matrix/client/versions", {
unstable_features: {},
versions: [],
versions: ["v1.1"],
});
rerender(getRawComponent("https://server2"));
await waitForElementToBeRemoved(() => screen.queryAllByLabelText("Loading…"));