Skip to content

algorithm108/cypress_typescript_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cypress Typescript Example With Commands Explanation

‿︵‿︵‿︵‿ヽ(°□° )ノ︵‿︵‿︵‿︵

Preparation

NodeJs is needed for Cypress initial installation NodeJs Download

If you are a Windows 98 user, try to find comfortable command line tool like Commander

How to run existing project

Open project folder and run

npm install
npm run cypress

How to Set up project from scratch

####!!! Make sure that NodeJs is available in env variables path or by using command:

node --version

###Create folder for project

cd "yo projects folder"
mkdir cypress_typescript_example

###Initialize NodeJs Project

npm init

init command will initialize a project and create the package. json file. There are a few questions asked by NPM each time the “init” command.

###Install Cypress and TypeScript language

npm install cypress typescript

Create in project root typescript configuration file: "tsconfig.json"

Add custom Cypress commands to package.json

"scripts": {
    "cypress": "cypress run",
    "cypress-open": "cypress open"
}

Create in project root Cypress configuration file: "cypress.json"

Run first cypress to verify yo project and create test samples

npm run cypress-open

Useful links to understand basics

Why to Adopt Cypress ?

Oh no, Protractor is Deprecated ?

Inside Cypress. Cypress Bundled tools

Understanding tsconfig.json

Cypress project structure

How to Configure Cypress

Cypress Custom Commands

License

Donate beer to Mr. Allex

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published