You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Combine auth.cy.ts and forgotpassword.cy.ts into UserLogin.cy.ts under separate describe blocks. This keeps tests organized and logically grouped.
Refactor to POM
Import and reuse login credentials from the LoginPage.ts file. If the credentials are not present, add new ones to the LoginPage file as well, and replace any direct usage of cy.loginbyapi with calls to LoginPage.
Add API verification with cy.intercept before clicking #user-profile-name to ensure the page is fully loaded.
Convert lines 9 and 10 to POM and create functions for them in the UserProfilePage.ts file.
Similarly, convert all code from lines 15 to 21 to the POM approach, adding cy.intercept for verification and moving credentials to LoginPage if they are missing.
Use the reusable helper functions in the commands.ts file for the submit button , notification verification, etc... common functions
Remove the hardcoded wait, and if necessary, replace it with cy.intercept() API verification to avoid flaky tests.
Task - 2
Combine all the tests into one single test
Test Follow: Click on forgot password -> Send password reset link -> Go back to the login page
Follow all the similar approaches for writing code mentioned in the test - 1
The text was updated successfully, but these errors were encountered:
Description
Refactor all the existing auth test in the platform to POM approach and use the reusable components
Task - Part 1
Rename and Merge Files:
Refactor to POM
Task - 2
The text was updated successfully, but these errors were encountered: