@@ -303,57 +303,6 @@ describe('SignInFactorOne', () => {
303303 await screen . findByText ( 'First, enter the code sent to your phone' ) ;
304304 } ) ;
305305
306- it ( 'entering a pwned password, then going back and clicking forgot password should result in the correct title' , async ( ) => {
307- const { wrapper, fixtures } = await createFixtures ( f => {
308- f . withEmailAddress ( ) ;
309- f . withPassword ( ) ;
310- f . withPreferredSignInStrategy ( { strategy : 'password' } ) ;
311- f . startSignInWithEmailAddress ( {
312- supportPassword : true ,
313- supportEmailCode : true ,
314- supportResetPassword : true ,
315- } ) ;
316- } ) ;
317- fixtures . signIn . prepareFirstFactor . mockReturnValueOnce ( Promise . resolve ( { } as SignInResource ) ) ;
318-
319- const errJSON = {
320- code : 'form_password_pwned' ,
321- long_message :
322- 'Password has been found in an online data breach. For account safety, please reset your password.' ,
323- message : 'Password has been found in an online data breach. For account safety, please reset your password.' ,
324- meta : { param_name : 'password' } ,
325- } ;
326-
327- fixtures . signIn . attemptFirstFactor . mockRejectedValueOnce (
328- new ClerkAPIResponseError ( 'Error' , {
329- data : [ errJSON ] ,
330- status : 422 ,
331- } ) ,
332- ) ;
333-
334- const { userEvent } = render ( < SignInFactorOne /> , { wrapper } ) ;
335- await userEvent . type ( screen . getByLabelText ( 'Password' ) , '123456' ) ;
336- await userEvent . click ( screen . getByText ( 'Continue' ) ) ;
337-
338- await screen . findByText ( 'Password compromised' ) ;
339- await screen . findByText (
340- 'This password has been found as part of a breach and can not be used, please reset your password.' ,
341- ) ;
342- await screen . findByText ( 'Or, sign in with another method' ) ;
343-
344- // Go back
345- await userEvent . click ( screen . getByText ( 'Back' ) ) ;
346-
347- // Choose to reset password via "Forgot password" instead
348- await userEvent . click ( screen . getByText ( / F o r g o t p a s s w o r d / i) ) ;
349- await screen . findByText ( 'Forgot Password?' ) ;
350- expect (
351- screen . queryByText (
352- 'This password has been found as part of a breach and can not be used, please reset your password.' ,
353- ) ,
354- ) . not . toBeInTheDocument ( ) ;
355- } ) ;
356-
357306 it ( 'using an compromised password should show the compromised password screen' , async ( ) => {
358307 const { wrapper, fixtures } = await createFixtures ( f => {
359308 f . withEmailAddress ( ) ;
0 commit comments