1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-31 13:44:28 +03:00

Use new getCrossSigningKeyId instead of old getCrossSigningId (#10885)

* Use new `getCrossSigningKeyId` instead of old `getCrossSigningId`

* Fix type error
This commit is contained in:
Richard van der Hoff
2023-05-15 19:30:43 +01:00
committed by GitHub
parent 77d18f1a43
commit 38c13509fd
5 changed files with 15 additions and 15 deletions

View File

@ -80,6 +80,7 @@ describe("DeviceListener", () => {
getDeviceVerificationStatus: jest.fn().mockResolvedValue({
crossSigningVerified: false,
}),
getCrossSigningKeyId: jest.fn(),
getUserDeviceInfo: jest.fn().mockResolvedValue(new Map()),
isCrossSigningReady: jest.fn().mockResolvedValue(true),
isSecretStorageReady: jest.fn().mockResolvedValue(true),
@ -93,7 +94,6 @@ describe("DeviceListener", () => {
isVersionSupported: jest.fn().mockResolvedValue(true),
isInitialSyncComplete: jest.fn().mockReturnValue(true),
getKeyBackupEnabled: jest.fn(),
getCrossSigningId: jest.fn(),
getStoredCrossSigningForUser: jest.fn(),
waitForClientWellKnown: jest.fn(),
isRoomEncrypted: jest.fn(),
@ -298,7 +298,7 @@ describe("DeviceListener", () => {
describe("when user does not have a cross signing id on this device", () => {
beforeEach(() => {
mockClient!.getCrossSigningId.mockReturnValue(null);
mockCrypto!.getCrossSigningKeyId.mockResolvedValue(null);
});
it("shows verify session toast when account has cross signing", async () => {
@ -312,7 +312,7 @@ describe("DeviceListener", () => {
});
it("checks key backup status when when account has cross signing", async () => {
mockClient!.getCrossSigningId.mockReturnValue(null);
mockCrypto!.getCrossSigningKeyId.mockResolvedValue(null);
mockClient!.getStoredCrossSigningForUser.mockReturnValue(new CrossSigningInfo(userId));
await createAndStart();
@ -322,7 +322,7 @@ describe("DeviceListener", () => {
describe("when user does have a cross signing id on this device", () => {
beforeEach(() => {
mockClient!.getCrossSigningId.mockReturnValue("abc");
mockCrypto!.getCrossSigningKeyId.mockResolvedValue("abc");
});
it("shows upgrade encryption toast when user has a key backup available", async () => {