Element-R: Use MatrixClient.CryptoApi.getUserVerificationStatus instead of MatrixClient.checkUserTrust in MemberTile.tsx (#11701)

* Use `MatrixClient.CryptoApi.getUserVerificationStatus` instead of `MatrixClient.checkUserTrust` in `MemberTile.tsx`

* Add tests to `MemberTile.tsx`

* Use `mocked` instead of `spyOn`
This commit is contained in:
Florian Duros 2023-10-04 15:01:39 +02:00 committed by GitHub
parent 241df0ba0a
commit d40092c9da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 255 additions and 4 deletions

View file

@ -122,7 +122,11 @@ export function createTestClient(): MatrixClient {
downloadKeys: jest.fn(),
},
},
getCrypto: jest.fn().mockReturnValue({ getUserDeviceInfo: jest.fn() }),
getCrypto: jest.fn().mockReturnValue({
getUserDeviceInfo: jest.fn(),
getUserVerificationStatus: jest.fn(),
getDeviceVerificationStatus: jest.fn(),
}),
getPushActionsForEvent: jest.fn(),
getRoom: jest.fn().mockImplementation((roomId) => mkStubRoom(roomId, "My room", client)),