Skip to content

This is a test suite for a sample shop website automationexercise.com

Notifications You must be signed in to change notification settings

cstemmer/cypress_sampleShop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cypress_sampleShop

This is a small test suite for a sample shop website https://automationexercise.com/

I made it to showcase what kind of work I can do with Cypress within a very limited timeframe.

How to get these tests running?

  1. Install Cypress following the instructions from the official documentation: https://docs.cypress.io/guides/getting-started/installing-cypress

  2. Clone this repo: git clone "https://github.com/cstemmer/cypress_sampleShop.git"

  3. The repo has 6 spec files:

    add_to_cart.cy.js - checks whether items can be successfully added to cart

    header.cy.js - checks whether all ui elements of header are present

    login.cy.js - tests for successful and unsuccessful login

    logout.cy.js - checks whether user can log out

    product_catalog.cy.js - checks whether elements of product catalog are displayed correctly and if hover behavior works correctly

    registration.cy.js - registers a new user with unique name and email

    It supports tests for two kinds of devices, mobile and desktop.

    How to run all tests at once?

    In order to run all of them on mobile, run this in terminal:

    npm run test:mobile

    For desktop, run this in termimal:

    npm run test:desktop

    How to run specific tests?

    Run this command in terminal (replacing the fragments within <> with actual values):

    npx cypress run --spec --env device= --config video=false --browser chrome --headed

    You can also run

    npx cypress open

    This will open cypress navigation window and you will be able to choose a spec you'd like to run.

About

This is a test suite for a sample shop website automationexercise.com

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published