Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 1.52 KB

readme.md

File metadata and controls

46 lines (35 loc) · 1.52 KB

Cypress: Book Store

Workflow

  1. Fork the repo.
  2. Clone your forked repository.
  3. Run the command npm i.
  4. Create a new branch git checkout -b testing.
  5. Resolve tasks in the cypress/e2e/bookStore.cy.js.
  6. Check yourself before submitting the task with a Cypress checklist.
  7. Create a pull request.
  8. Do not forget to click Re-request review if you submit the homework after the previous review.

Task

App for testing: BookStore

Create your account manually before completing the task.

Your task is to check the following flow:

  1. Login:

    • assert your username after login username;
    • asser new URL;
  2. Navigate to Book store.

  3. Type into the search field 'Speaking JavaScript'.

  4. Click on the 'Speaking JavaScript' book.

    • assert description of the book.
  5. Click on [Add To Your Collection].

  6. Confirm popup. You can do it with cy.on():

    cy.on('window:alert', (str) => {
        expect(str).to.equal(`Book added to your collection.`)
    })
  7. Go to your profile page.

  8. Assert 'Speaking JavaScript' in your shopping list.

  9. Delete the Speaking JavaScript book from your list.

Advanced level

  1. Split your test flow into 3 tests: login, add a book, and delete the book.
  2. Create cy.login() command to login with API. To implement this command, use cy.request() with .setCookie().
  3. Use cy.login() in second and third tests.