GithubHelp home page GithubHelp logo

cypress_fourth_hw's Introduction

Workflow:

  1. Fork the repo.
  2. Clone your forked repository.
  3. Create a new branch git checkout -b develop.
  4. Resolve tasks in the cypress/integration/signIn.spec.js.
  5. Create a pull request.

Basic level

App for testing: https://demoqa.com/login

Create your account before tests register page. Note: that action you should perform only once. Do not automate it!

Your task is to automate the next test cases:

  1. Login as your registered account
  2. Check your username after login username
  3. Navigate to books list
  4. Type into search field "Speaking JavaScript"
  5. Click on 'Speaking JavaScript' link
  6. Click on [Add To Your Collection] button on Speaking JavaScript preview page
  7. Confirm popup. You can do it with cy.on()
cy.on('window:alert', (str) => {
    expect(str).to.equal(`Book added to your collection.`)
})
  1. Open your profile page
  2. Assert 'Speaking JavaScript' in your shopping list
  3. Delete Speaking JavaScript book from your list

In order to be logged in before each test, do the following:

  1. Create beforeEach method for login before your tests
  2. Add custom cypress cy.login(email, password) command (In this step you should not use cy.request)
  3. Move beforeEach method to support/index.js file and run login before each IT

Advanced level

  1. Rewrite Login method using cy.request().then((resp) => {resp.body.token ....})
  2. Add cookies to defaults
Cypress.Cookies.defaults({
    preserve: [...]
})

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.