Install nvm see docs alternatively, you can install node (refer to the .nvmrc file for the current node version) directly eg if you are using windows.
Install node
nvm install
Set current node version
nvm use
Install yarn
$ npm install -g yarn
Install yarn dependencies
$ yarn
All commands are to be run from the project root directory (unless otherwise specified).
Prepare your cypress.env.json file (copy cypress.env.json.dist
to cypress.env.json
)
$ cp cypress.env.json.dist cypress.env.json
Open up your cypress.env.json
file, and update your target website url. This is the url that tests will be run against.
{
"baseUrl": "http://my.website.goes.here/"
}
Note: make sure to set current node version if you have restarted or opened a new shell
nvm use
yarn open
open cypress in interactive modeyarn test
runs cypress tests in headless mode with chrome browser