- Fork the repo.
- Clone your forked repository.
- Run
npm i
. - Create a new branch
git checkout -b e2e_testing
. - Run the app.
- Resolve tasks.
- Check yourself before submitting the task with a Cypress checklist.
- Create a pull request.
- Do not forget to click on
Re-request review
if you submit the homework after previous review.
Go to e2e
folder and cover listed functionality with e2e tests:
- creating an article;
- editings an article;
- deleting an article;
- sign in (positive);
- sign in (invalid credentials);
- sign up (positive);
- sign up (negative);
- following/unfollowing the user;
- updating bio;
- updating username;
- updating email;
- updating password.
- Clear all data from the database before the test.
- Add
data-qa
attributes for all elements you are working with in tests. - Use faker and custom methods to generate a fake data in tests.
Use PageObject pattern for your tests:
- Create a files with POM classes for your pages in
cypress
/support
/pages
. - Use
PageObject.js
file for the common for the whole app elements.
Observe an example in cypress
/e2e
/signIn.cy.js
.
Find and additinoanl about Page Object in the Cypress topic.