Giter VIP home page Giter VIP logo

udemy-cypress-course's Introduction

Cypress automation for people in a hurry

Repository for a course hosted on Udemy on the topic of test automation in Cypress. The name of the course is a homage to Neil DeGrasse Tyson’s book which I recommend you give a read.

About author

I’m Filip. I’m a QA lead at Slido and Cypress.io ambassador

What’s in here

In this repo, you can find an application we are testing throughout the course as well as all the examples in video course. Each coding video chapter starts with start.js file, so you can follow along and code with me. The final state of the code can be found in final.js file. Some of the chapters contain challenge.js file too. As the name suggest, you can find additional examples and challenges to improve your Cypress skills.

TodoMVC app

Simple todoMVC app build with Vue.js, originally forked from testing-workshop-cypress. I expanded the application and added a couple of features.

How to install and run app

  1. npm install
  2. npm start
  3. open app on http://localhost:3000

Backend

Backend is a json-server on a static json file located in todomvc/data.json.

API

Just a short API documentation for our todo app.


GET /todos

Returns an array of all todo items.


POST /todos

Creates a todo item.

Example of an item payload:

{
  "title": "buy milk",
  "completed": false,
  "id": 1
}

PATCH /todos/{id}

Edits todo item, usually to change completed state. {id} stands for todo id.

Example payload:

{
  "completed": true
}

DELETE /todos/{id}

Deletes todo item with given id.


DELETE /todos

Deletes all todos.


POST /todos/seed

Seed an array of todos. Payload needs to be an array of objects, containing todos. This request rewrites all todos.


POST /signup

Creates a new account. Example payload:

{
  "email": "[email protected]",
  "password": "abc123"
}

Example error statuses:

409 (Conflict) - Account already exists

401 (Unauthorized) - Email or password was not provided

Request headers:

sendwelcomeemail: true - Sends welcome email to signed up user

Response headers:

Set-Cookie: "auth=true;"


POST /login

Logs into a new account.

Example payload:

{
  "email": "[email protected]",
  "password": "abc123"
}

Response headers:

Set-Cookie: "auth=true;"

Example error statuses:

401 (Unauthorized) - Wrong email or password


POST /reset

Deletes all todos and all accounts.


DELETE /accounts

Deletes all accounts.


POST /accounts/seed

Seed an array of accounts. Payload needs to be an array of objects, containing accounts. This request rewrites all accounts.

udemy-cypress-course's People

Contributors

filiphric avatar patlaundy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

udemy-cypress-course's Issues

Command "." not found

When I try to start the code (on windows 10) i get:
npm start

[email protected] start
cd todomvc && npm start

[email protected] start
./node_modules/.bin/json-server --static . data.json -m middleware.js --config json-server.json -w

Der Befehl "." ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
PS C:\Users\RolandS\udemy-cypress-course>

This means the command "." is either wrong spelled or could not be found

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.