- Fork the repo.
- Clone your forked repository.
- Run the command
npm i
. - Create a new branch
git checkout -b testing
. - Resolve tasks in the
cypress
/e2e
/createArticle.cy.js
. - Check yourself before submitting the task with a Cypress checklist.
- Create a pull request.
- Do not forget to click
Re-request review
if you submit the homework after the previous review.
App for testing: BookStore
Create your account manually before completing the task.
Your task is to check the following flow:
-
Login:
- assert your username after login username;
- asser new URL;
-
Navigate to
Book store
. -
Type into the search field 'Speaking JavaScript'.
-
Click on the 'Speaking JavaScript' book.
- assert description of the book.
-
Click on [Add To Your Collection].
-
Confirm popup. You can do it with cy.on():
cy.on('window:alert', (str) => { expect(str).to.equal(`Book added to your collection.`) })
-
Go to your profile page.
-
Assert 'Speaking JavaScript' in your shopping list.
-
Delete the Speaking JavaScript book from your list.
- Split your test flow into 3 tests: login, add a book, and delete the book.
- Create
cy.login()
command to login with API. To implement this command, usecy.request()
with.setCookie()
. - Use
cy.login()
in second and third tests.