diff --git a/test/components/views/settings/devices/LoginWithQR-test.tsx b/test/components/views/settings/devices/LoginWithQR-test.tsx index 188997745d2..3f72b96ccb8 100644 --- a/test/components/views/settings/devices/LoginWithQR-test.tsx +++ b/test/components/views/settings/devices/LoginWithQR-test.tsx @@ -89,8 +89,7 @@ describe("", () => { jest.spyOn(MSC3906Rendezvous.prototype, "verifyNewDeviceOnExistingDevice").mockResolvedValue(undefined); client.requestLoginToken.mockResolvedValue({ login_token: "token", - expires_in: 1000, // this is as per MSC3882 r0 - expires_in_ms: 1000 * 1000, // this is as per MSC3882 r1 + expires_in_ms: 1000 * 1000, } as LoginTokenPostResponse); // we force the type here so that it works with versions of js-sdk that don't have r1 support yet }); diff --git a/test/components/views/settings/devices/LoginWithQRSection-test.tsx b/test/components/views/settings/devices/LoginWithQRSection-test.tsx index 12b18354add..5411ef1235b 100644 --- a/test/components/views/settings/devices/LoginWithQRSection-test.tsx +++ b/test/components/views/settings/devices/LoginWithQRSection-test.tsx @@ -48,8 +48,6 @@ function makeVersions(unstableFeatures: Record): IServerVersion }; } -const unstableName = GET_LOGIN_TOKEN_CAPABILITY.altName as string; - describe("", () => { beforeAll(() => { jest.spyOn(MatrixClientPeg, "get").mockReturnValue(makeClient({})); @@ -69,16 +67,6 @@ describe("", () => { expect(container).toMatchSnapshot(); }); - it("only MSC3882 r0 enabled", async () => { - const { container } = render(getComponent({ versions: makeVersions({ "org.matrix.msc3882": true }) })); - expect(container).toMatchSnapshot(); - }); - - it("only MSC3882 r1 enabled", async () => { - const { container } = render(getComponent({ capabilities: { [unstableName]: { enabled: true } } })); - expect(container).toMatchSnapshot(); - }); - it("only get_login_token enabled", async () => { const { container } = render( getComponent({ capabilities: { [GET_LOGIN_TOKEN_CAPABILITY.name]: { enabled: true } } }), @@ -86,16 +74,6 @@ describe("", () => { expect(container).toMatchSnapshot(); }); - it("MSC3886 + MSC3882 r1 disabled", async () => { - const { container } = render( - getComponent({ - versions: makeVersions({ "org.matrix.msc3886": true }), - capabilities: { [unstableName]: { enabled: false } }, - }), - ); - expect(container).toMatchSnapshot(); - }); - it("MSC3886 + get_login_token disabled", async () => { const { container } = render( getComponent({ @@ -108,32 +86,6 @@ describe("", () => { }); describe("should render panel", () => { - it("MSC3882 r0 + MSC3886", async () => { - const { container } = render( - getComponent({ - versions: makeVersions({ - "org.matrix.msc3882": true, - "org.matrix.msc3886": true, - }), - }), - ); - expect(container).toMatchSnapshot(); - }); - - it("MSC3882 r1 + MSC3886", async () => { - const { container } = render( - getComponent({ - versions: makeVersions({ - "org.matrix.msc3886": true, - }), - capabilities: { - [unstableName]: { enabled: true }, - }, - }), - ); - expect(container).toMatchSnapshot(); - }); - it("get_login_token + MSC3886", async () => { const { container } = render( getComponent({ diff --git a/test/components/views/settings/devices/__snapshots__/LoginWithQRSection-test.tsx.snap b/test/components/views/settings/devices/__snapshots__/LoginWithQRSection-test.tsx.snap index 566d99cdd3c..f4b2acafaf7 100644 --- a/test/components/views/settings/devices/__snapshots__/LoginWithQRSection-test.tsx.snap +++ b/test/components/views/settings/devices/__snapshots__/LoginWithQRSection-test.tsx.snap @@ -1,93 +1,11 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[` should not render MSC3886 + MSC3882 r1 disabled 1`] = `
`; - exports[` should not render MSC3886 + get_login_token disabled 1`] = `
`; exports[` should not render no support at all 1`] = `
`; -exports[` should not render only MSC3882 r0 enabled 1`] = `
`; - -exports[` should not render only MSC3882 r1 enabled 1`] = `
`; - exports[` should not render only get_login_token enabled 1`] = `
`; -exports[` should render panel MSC3882 r0 + MSC3886 1`] = ` -
-
-
-

- Sign in with QR code -

-
-
-
-

- You can use this device to sign in a new device with a QR code. You will need to scan the QR code shown on this device with your device that's signed out. -

-
- Show QR code -
-
-
-
-
-`; - -exports[` should render panel MSC3882 r1 + MSC3886 1`] = ` -
-
-
-

- Sign in with QR code -

-
-
-
-

- You can use this device to sign in a new device with a QR code. You will need to scan the QR code shown on this device with your device that's signed out. -

-
- Show QR code -
-
-
-
-
-`; - exports[` should render panel get_login_token + MSC3886 1`] = `