@@ -196,39 +196,4 @@ describe('TwoFactorAuthComponent', () => {
196196
197197 expect ( mockApiService . idpuser . getTwoFactorMethods ) . toHaveBeenCalled ( ) ;
198198 } ) ;
199-
200- it ( 'should call sendCode when Enter is pressed on contactInfo input' , async ( ) => {
201- const { instance } = await shallow . render ( ) ;
202- const event = {
203- preventDefault : jasmine . createSpy ( 'preventDefault' ) ,
204- } as unknown as KeyboardEvent ;
205-
206- instance . form . patchValue ( { contactInfo : 'user@example.com' } ) ;
207-
208- const sendCodeSpy = spyOn ( instance , 'sendCode' ) . and . callThrough ( ) ;
209-
210- instance . onEnterPress ( event , 'sendCode' ) ;
211-
212- expect ( event . preventDefault ) . toHaveBeenCalled ( ) ;
213- expect ( sendCodeSpy ) . toHaveBeenCalled ( ) ;
214- } ) ;
215-
216- it ( 'should call submitData when Enter is pressed on code input' , async ( ) => {
217- const { instance } = await shallow . render ( ) ;
218- const event = {
219- preventDefault : jasmine . createSpy ( 'preventDefault' ) ,
220- } as unknown as KeyboardEvent ;
221-
222- instance . form . patchValue ( { code : '1234' , contactInfo : 'user@example.com' } ) ;
223-
224- const submitDataSpy = spyOn ( instance , 'submitData' ) . and . callThrough ( ) ;
225-
226- instance . onEnterPress ( event , 'submitData' ) ;
227-
228- expect ( event . preventDefault ) . toHaveBeenCalled ( ) ;
229- expect ( submitDataSpy ) . toHaveBeenCalledWith ( {
230- code : '1234' ,
231- contactInfo : 'user@example.com' ,
232- } ) ;
233- } ) ;
234199} ) ;
0 commit comments