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

Use new api CryptoApi.getCrossSigningStatus in CrossSigningPanel (#11052)

* Use new api `CryptoApi.getCrossSigningStatus` in `CrossSigningPanel`

* Update `CrossSigningPanel-test.tsx`

* Update `publicKeysOnDevice`

* Fix `CryptoApi` import

* Fix strict type

* Fix tests

* Remove `crossSigningInfo` in `mockClientMethodsCrypto`

* Move matrix client initialization in `beforeEach`
This commit is contained in:
Florian Duros
2023-06-12 20:33:39 +02:00
committed by GitHub
parent a40d1ec670
commit d5d1ec775c
3 changed files with 45 additions and 28 deletions

View File

@ -156,9 +156,16 @@ export const mockClientMethodsCrypto = (): Partial<
crypto: {
isSecretStorageReady: jest.fn(),
getSessionBackupPrivateKey: jest.fn(),
crossSigningInfo: {
getId: jest.fn(),
isStoredInSecretStorage: jest.fn(),
},
},
getCrypto: jest.fn().mockReturnValue({
getCrossSigningStatus: jest.fn().mockResolvedValue({
publicKeysOnDevice: true,
privateKeysInSecretStorage: false,
privateKeysCachedLocally: {
masterKey: true,
selfSigningKey: true,
userSigningKey: true,
},
}),
}),
});