@@ -16,9 +16,9 @@ test("Password Recovery title is visible", async ({ page }) => {
1616test ( "Input is visible, empty and editable" , async ( { page } ) => {
1717 await page . goto ( "/recover-password" )
1818
19- await expect ( page . getByPlaceholder ( "Email ") ) . toBeVisible ( )
20- await expect ( page . getByPlaceholder ( "Email ") ) . toHaveText ( "" )
21- await expect ( page . getByPlaceholder ( "Email ") ) . toBeEditable ( )
19+ await expect ( page . getByTestId ( "email-input ") ) . toBeVisible ( )
20+ await expect ( page . getByTestId ( "email-input ") ) . toHaveText ( "" )
21+ await expect ( page . getByTestId ( "email-input ") ) . toBeEditable ( )
2222} )
2323
2424test ( "Continue button is visible" , async ( { page } ) => {
@@ -40,7 +40,7 @@ test("User can reset password successfully using the link", async ({
4040 await signUpNewUser ( page , fullName , email , password )
4141
4242 await page . goto ( "/recover-password" )
43- await page . getByPlaceholder ( "Email ") . fill ( email )
43+ await page . getByTestId ( "email-input ") . fill ( email )
4444
4545 await page . getByRole ( "button" , { name : "Continue" } ) . click ( )
4646
@@ -64,8 +64,8 @@ test("User can reset password successfully using the link", async ({
6464 // Set the new password and confirm it
6565 await page . goto ( url )
6666
67- await page . getByPlaceholder ( "New Password ") . fill ( newPassword )
68- await page . getByPlaceholder ( "Confirm Password ") . fill ( newPassword )
67+ await page . getByTestId ( "new-password-input ") . fill ( newPassword )
68+ await page . getByTestId ( "confirm-password-input ") . fill ( newPassword )
6969 await page . getByRole ( "button" , { name : "Reset Password" } ) . click ( )
7070 await expect ( page . getByText ( "Password updated successfully" ) ) . toBeVisible ( )
7171
@@ -79,8 +79,8 @@ test("Expired or invalid reset link", async ({ page }) => {
7979
8080 await page . goto ( invalidUrl )
8181
82- await page . getByPlaceholder ( "New Password ") . fill ( password )
83- await page . getByPlaceholder ( "Confirm Password ") . fill ( password )
82+ await page . getByTestId ( "new-password-input ") . fill ( password )
83+ await page . getByTestId ( "confirm-password-input ") . fill ( password )
8484 await page . getByRole ( "button" , { name : "Reset Password" } ) . click ( )
8585
8686 await expect ( page . getByText ( "Invalid token" ) ) . toBeVisible ( )
@@ -96,7 +96,7 @@ test("Weak new password validation", async ({ page, request }) => {
9696 await signUpNewUser ( page , fullName , email , password )
9797
9898 await page . goto ( "/recover-password" )
99- await page . getByPlaceholder ( "Email ") . fill ( email )
99+ await page . getByTestId ( "email-input ") . fill ( email )
100100 await page . getByRole ( "button" , { name : "Continue" } ) . click ( )
101101
102102 const emailData = await findLastEmail ( {
@@ -115,8 +115,8 @@ test("Weak new password validation", async ({ page, request }) => {
115115
116116 // Set a weak new password
117117 await page . goto ( url )
118- await page . getByPlaceholder ( "New Password ") . fill ( weakPassword )
119- await page . getByPlaceholder ( "Confirm Password ") . fill ( weakPassword )
118+ await page . getByTestId ( "new-password-input ") . fill ( weakPassword )
119+ await page . getByTestId ( "confirm-password-input ") . fill ( weakPassword )
120120 await page . getByRole ( "button" , { name : "Reset Password" } ) . click ( )
121121
122122 await expect (
0 commit comments