@@ -24,7 +24,7 @@ test("validation error message is displayed when input field is empty", async ()
2424
2525 await waitFor ( ( ) => {
2626 expect (
27- screen . getByText ( "changePassword.messages.validation.oldPassword " ) ,
27+ screen . getByText ( "changePassword.messages.validation.currentPassword " ) ,
2828 ) . toBeDefined ( ) ;
2929 } ) ;
3030 await waitFor ( ( ) => {
@@ -45,8 +45,8 @@ test("validation error message is displayed for unmatched confirm password", asy
4545 const handleSubmit = vi . fn ( ) ;
4646 const { user } = setup ( < ChangePasswordForm handleSubmit = { handleSubmit } /> ) ;
4747
48- const oldPassword = screen . getByLabelText (
49- "changePassword.form.oldPassword .label" ,
48+ const currentPassword = screen . getByLabelText (
49+ "changePassword.form.currentPassword .label" ,
5050 ) ;
5151 const newPassword = screen . getByLabelText (
5252 "changePassword.form.newPassword.label" ,
@@ -57,7 +57,7 @@ test("validation error message is displayed for unmatched confirm password", asy
5757 const submitButton = screen . getByText ( "changePassword.form.actions.submit" ) ;
5858
5959 await act ( async ( ) => {
60- await user . type ( oldPassword , "Test@123" ) ;
60+ await user . type ( currentPassword , "Test@123" ) ;
6161 await user . type ( newPassword , "Test@12345" ) ;
6262 await user . type ( confirmPassword , "Test@12" ) ;
6363 } ) ;
@@ -81,8 +81,8 @@ test("form is successfully submitted", async () => {
8181 const handleSubmit = vi . fn ( ) ;
8282 const { user } = setup ( < ChangePasswordForm handleSubmit = { handleSubmit } /> ) ;
8383
84- const oldPassword = screen . getByLabelText (
85- "changePassword.form.oldPassword .label" ,
84+ const currentPassword = screen . getByLabelText (
85+ "changePassword.form.currentPassword .label" ,
8686 ) ;
8787 const newPassword = screen . getByLabelText (
8888 "changePassword.form.newPassword.label" ,
@@ -93,7 +93,7 @@ test("form is successfully submitted", async () => {
9393 const submitButton = screen . getByText ( "changePassword.form.actions.submit" ) ;
9494
9595 await act ( async ( ) => {
96- await user . type ( oldPassword , "Test@123" ) ;
96+ await user . type ( currentPassword , "Test@123" ) ;
9797 await user . type ( newPassword , "Test@12345" ) ;
9898 await user . type ( confirmPassword , "Test@12345" ) ;
9999
0 commit comments