Use new CrytoApi.restoreKeyBackup
& CrytoApi.restoreKeyBackupFromPassphrase
api (#28385)
* Use new `CrytoApi.restoreKeyBackup` & `CrytoApi.restoreKeyBackupFromPassprhase` api * Use new `CrytoApi.restoreKeyBackup` api in `SetupEncryptionStore` * Add tests to `RestoreKeyBackupDialog`
This commit is contained in:
parent
7b1e303328
commit
c67e67af4e
5 changed files with 383 additions and 44 deletions
|
@ -131,6 +131,10 @@ export function createTestClient(): MatrixClient {
|
|||
createRecoveryKeyFromPassphrase: jest.fn().mockResolvedValue({}),
|
||||
bootstrapSecretStorage: jest.fn(),
|
||||
isDehydrationSupported: jest.fn().mockResolvedValue(false),
|
||||
restoreKeyBackup: jest.fn(),
|
||||
restoreKeyBackupWithPassphrase: jest.fn(),
|
||||
loadSessionBackupPrivateKeyFromSecretStorage: jest.fn(),
|
||||
storeSessionBackupPrivateKey: jest.fn(),
|
||||
}),
|
||||
|
||||
getPushActionsForEvent: jest.fn(),
|
||||
|
@ -275,6 +279,7 @@ export function createTestClient(): MatrixClient {
|
|||
sendStickerMessage: jest.fn(),
|
||||
getLocalAliases: jest.fn().mockReturnValue([]),
|
||||
uploadDeviceSigningKeys: jest.fn(),
|
||||
isKeyBackupKeyStored: jest.fn().mockResolvedValue(null),
|
||||
} as unknown as MatrixClient;
|
||||
|
||||
client.reEmitter = new ReEmitter(client);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue