Giter Site home page Giter Site logo

cypress-typescript's Introduction

This project contains

✅ POM, class structure, constructor for selectors, re-use of repetitive methods

✅ Tests: 10

- UI
    - Successfull login & logout
    - Unsuccessfull login with incorrect email
    - Unsuccessfull login with incorrect password
    - Incercept and validate backend call from frontend
    - Stubbing a response body and validate the response
    - Stubbing a response status without touching server and validate the response

- API
    - POST: Create customer record
    - GET: List customer records
    - PATCH: Update customer record
    - DELETE: Delete customer record

✅ Proper validation

✅ Use of intercepts - To validate backend calls through UI

✅ Github Actions setup on push to master branch

✅ Run tests in headless mode: yarn cypress:headless

✅ Cypress commands

✅ Aliases to wait for intercepts

✅ Integrated cypress dashboard for reporting

✅ Gropped API & UI test spec to run separately through node scripts

✅ Conventional commit style

To Run Tests

To Run Cypress E2E Tests Locally

# Install Dependencies
yarn

# Run all the tests in headless mode
yarn cypress:headless

# Run the tests in Cypress UI
yarn cypress:open

# Run UI Tests
yarn cypress:ui

# Run API Tests
yarn cypress:api

Important Links

  1. Page Objects - Link
  2. UI tests - Link
  3. API tests - Link
  4. Cypress commands - Link
  5. Intercepts & Alias - Link
  6. Github Actions workflow - Link
  7. package.json - Link
  8. cypress.config.js - Link
  9. Cypress Dashboard Report - Link

Directory Structure

.
├── README.md
├── cypress
│   ├── fixtures
│   │   └── example.json
│   ├── support
│   │   ├── Interfaces
│   │   │   ├── IBilling.ts
│   │   │   ├── ICustomer.ts
│   │   │   └── ILogin.ts
│   │   ├── PageObjects
│   │   │   ├── CustomerPage.ts
│   │   │   └── LoginPage.ts
│   │   ├── commands.ts
│   │   ├── e2e.ts
│   │   └── index.d.ts
│   ├── tests
│   │   ├── api
│   │   │   └── customer_api.cy.ts
│   │   └── ui
│   │       ├── customer.cy.ts
│   │       └── login.cy.ts
│   └── tsconfig.json
├── cypress.config.js
├── cypress.env.json
├── package.json
└── yarn.lock

8 directories, 18 files

cypress-typescript's People

Contributors

tux7p avatar

Watchers

 avatar

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.