@@ -240,7 +240,7 @@ describe("UserIdentityWarning", () => {
240240 ) ;
241241 } ) ;
242242
243- describe ( "Warning are displayed in consistent order" , ( ) => {
243+ describe ( "Warnings are displayed in consistent order" , ( ) => {
244244 it ( "Ensure lexicographic order for prompt" , async ( ) => {
245245 // members are not returned lexicographic order
246246 mockMembershipForRoom ( room , [ "@b:example.org" , "@a:example.org" ] ) ;
@@ -340,10 +340,6 @@ describe("UserIdentityWarning", () => {
340340 it ( "when invited users can see encrypted messages" , async ( ) => {
341341 // Nobody in the room yet
342342 mockMembershipForRoom ( room , [ ] ) ;
343- // jest.spyOn(room, "getEncryptionTargetMembers").mockResolvedValue([]);
344- // jest.spyOn(room, "getMember").mockImplementation((userId) => {
345- // return null;
346- // });
347343 jest . spyOn ( room , "shouldEncryptForInvitedMembers" ) . mockReturnValue ( true ) ;
348344 const crypto = client . getCrypto ( ) ! ;
349345 jest . spyOn ( crypto , "getUserVerificationStatus" ) . mockResolvedValue (
@@ -613,20 +609,14 @@ describe("UserIdentityWarning", () => {
613609 renderComponent ( client , room ) ;
614610 await sleep ( 10 ) ; // give it some time to finish initialising
615611
616- // jest.spyOn(crypto, "getUserVerificationStatus").mockImplementation(async () => {
617612 act ( ( ) => {
618- // jest.spyOn(crypto, "getUserVerificationStatus").mockResolvedValue(
619- // new UserVerificationStatus(false, false, false, true),
620- // );
621613 client . emit (
622614 CryptoEvent . UserTrustStatusChanged ,
623615 "@alice:example.org" ,
624616 new UserVerificationStatus ( false , false , false , true ) ,
625617 ) ;
626618 firstStatusPromise . resolve ( undefined ) ;
627619 } ) ;
628- // return Promise.resolve(new UserVerificationStatus(false, false, false, false));
629- // });
630620 await waitFor ( ( ) =>
631621 expect (
632622 getWarningByText ( "Alice's (@alice:example.org) identity appears to have changed." ) ,
0 commit comments