This is a companion repository for the Introduction to Cypress course on Test Automation university
I am Filip. I am DevRel at Replay.io and a Cypress ambassador
This repo contains all the materials for the course. Most of the chapters start with [chapter_name]_start.js
and finish with [chapter_name]_end.js
file.
Bundled as a submodule is an app that is a clone of a popular Trello app. You can create boards, lists and cards. You can drag and drop cards between lists or even upload a picture to the card detail. There’s also a very simple signup and login which will allow you to create private boards
Super simple
npm install
npm start
- Open your browser on
http://localhost:3000
The application uses a json file for a database which you can find in trelloapp/backend/data/database.json
. Uploaded files are in trelloapp/backend/data/uploaded
folder.
By typing F2
key in the application, a small toolset appears that will allow you to reset your application to a desired state. You can delete boards, lists, cards, users or everything. This is useful when playing with the application manually.
GET
/api/boards
Returns all boards
example (unauthorized user):
[
{
"name": "new project",
"user": 0,
"id": 27315982008,
"starred": false,
"created": "2020-09-01"
},
{
"name": "moon landing 2",
"user": 0,
"id": 14254049205,
"starred": true,
"created": "2020-09-01"
}
]
example (authorized user):
[
{
"name": "new project",
"user": 0,
"id": 27315982008,
"starred": false,
"created": "2020-09-01"
},
{
"name": "moon landing 2",
"user": 0,
"id": 14254049205,
"starred": true,
"created": "2020-09-01"
},
{
"name": "private board",
"user": 1, // user id of the board author
"id": 6606529940,
"starred": false,
"created": "2020-09-01"
}
]
POST
/api/boards
Creates a new board
example request:
{
"name": "moon landing 2"
}
example response:
{
"name": "moon landing 2",
"user": 1,
"id": 22559285486,
"starred": false,
"created": "2020-09-01",
}
GET
/api/boards/{boardId}
Returns details of a board with given boardId
example response:
{
"name": "new project",
"user": 0,
"id": 27315982008,
"starred": false,
"created": "2020-09-01"
}
PATCH
/api/boards/{boardId}
Changes details of a board with given boardId
. starred
and name
attributes can be changed
example request:
{
"starred": true,
"name": "project alpha"
}
DELETE
/api/boards/{boardId}
Deletes a board with given boardId
GET
/api/lists
Returns all lists example response
[
{
"boardId": 123456789,
"name": "Groceries",
"order": 0,
"id": 68040017610,
"created": "2022-01-26"
},
{
"boardId": 987654321,
"name": "Drugstore",
"order": 1,
"id": 87979775072,
"created": "2022-02-11"
}
]
GET
/api/lists?boardId={boardId}
Returns all lists with given boardId
POST
/api/lists
Creates a new list
example request
{
"boardId": {boardId}, // required
"name": "to do"
}
PATCH
/api/lists/{listId}
Changes details of a list with given listId
.
example request
{
"name": "renamed list"
}
DELETE
/api/lists/{listId}
Deletes a list with given listId
.
POST
/api/cards
Creates a new card
example request
{
"boardId": {boardId}, // required
"listId": {listId}, // required
"name": "buy milk"
}
PATCH
/api/cards/{cardId}
Changes details of a card cardId
example request
{
"completed": true
}
DELETE
/api/cards/{cardId}
Changes details of a card cardId
GET
/api/users
Returns information for the current user
example response
{
"user": {
"email": "filip@example.com",
"password": "$2a$10$fdK.5O8uogdfjgklôjgd/gf90890NKLJ",
"id": 1
}
}
POST
/api/signup
Creates a new user
example request
{
"email": "filip@example.com",
"password": "nbusr1234"
}
POST
/api/welcomeemail
Sends a request for a welcome email
príklad tela API volania:
{
"email": "filip@example.com"
}
POST
/api/login
Logs in a user
example request
{
"email": "filip@example.com",
"password": "nbusr1234"
}
POST
/api/reset
Deletes all boards, lists, cards and users
DELETE
/api/boards
Deletes all boards, lists and cards
DELETE
/api/lists
Deletes all lists and cards
DELETE
/api/cards
Deletes all cards
DELETE
/api/users
Deletes all users