@@ -186,7 +186,8 @@ describe('SignInFactorOne', () => {
186186 const { userEvent } = render ( < SignInFactorOne /> , { wrapper } ) ;
187187 await userEvent . type ( screen . getByLabelText ( 'Password' ) , '123456' ) ;
188188 await userEvent . click ( screen . getByText ( 'Continue' ) ) ;
189- await screen . findByText ( 'Incorrect Password' ) ;
189+ const errorElement = await screen . findByTestId ( 'form-feedback-error' ) ;
190+ expect ( errorElement ) . toHaveTextContent ( / I n c o r r e c t P a s s w o r d / i) ;
190191 } ) ;
191192
192193 it ( 'redirects back to sign-in if the user is locked' , async ( ) => {
@@ -558,7 +559,8 @@ describe('SignInFactorOne', () => {
558559 ) ;
559560 const { userEvent } = render ( < SignInFactorOne /> , { wrapper } ) ;
560561 await userEvent . type ( screen . getByLabelText ( / E n t e r v e r i f i c a t i o n c o d e / i) , '123456' ) ;
561- await screen . findByText ( 'Incorrect code' ) ;
562+ const errorElement = await screen . findByTestId ( 'form-feedback-error' ) ;
563+ expect ( errorElement ) . toHaveTextContent ( / I n c o r r e c t c o d e / i) ;
562564 } ) ;
563565
564566 it ( 'redirects back to sign-in if the user is locked' , async ( ) => {
@@ -663,7 +665,8 @@ describe('SignInFactorOne', () => {
663665 ) ;
664666 const { userEvent } = render ( < SignInFactorOne /> , { wrapper } ) ;
665667 await userEvent . type ( screen . getByLabelText ( / E n t e r v e r i f i c a t i o n c o d e / i) , '123456' ) ;
666- await screen . findByText ( 'Incorrect phone code' ) ;
668+ const errorElement = await screen . findByTestId ( 'form-feedback-error' ) ;
669+ expect ( errorElement ) . toHaveTextContent ( / I n c o r r e c t p h o n e c o d e / i) ;
667670 } ) ;
668671
669672 it ( 'redirects back to sign-in if the user is locked' , async ( ) => {
0 commit comments