unit test basic paths in UserInfo (#7740)
* unit test main paths in UserInfo component Signed-off-by: Kerry Archibald <kerrya@element.io> * one more test case Signed-off-by: Kerry Archibald <kerrya@element.io> * remove BasicUserInfo export Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
parent
af0b21de9d
commit
30d1ac1eea
5 changed files with 190 additions and 4 deletions
|
@ -106,6 +106,7 @@ const EncryptionPanel: React.FC<IProps> = (props: IProps) => {
|
|||
setPhase(request.phase);
|
||||
}
|
||||
}, [onClose, request]);
|
||||
|
||||
useEventEmitter(request, "change", changeHandler);
|
||||
|
||||
const onStartVerification = useCallback(async () => {
|
||||
|
@ -131,6 +132,7 @@ const EncryptionPanel: React.FC<IProps> = (props: IProps) => {
|
|||
const isSelfVerification = request ?
|
||||
request.isSelfVerification :
|
||||
member.userId === MatrixClientPeg.get().getUserId();
|
||||
|
||||
if (!request || requested) {
|
||||
const initiatedByMe = (!request && isRequesting) || (request && request.initiatedByMe);
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue