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:
parent
a40d1ec670
commit
d5d1ec775c
3 changed files with 45 additions and 28 deletions
|
@ -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,
|
||||
},
|
||||
}),
|
||||
}),
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue