Clone repository with SSH:
git clone <replace>
Switch to root of project:
cd <replace>
Install package:
npm install
Test install succeded:
./node_modules/.bin/cypress open
In cypress.json
the baseUrl
is currently set to .
To override or use additional configurations create a separate cypress.env.json
.
Example:
{
"baseUrl": "<replace>"
}
We use custom Scripts in package.json
to open Cypress, run all tests, and some other things from the command line.
"scripts": {
"cy:open": "cypress open",
"cy:run": "cypress run",
"git:hook": "husky install",
"format": "prettier --write ."
}
To open Cypress:
npm run cy:open
To run all tests:
npm run cy:run
We're going to let robots do some formatting for us. Enable the git hook for Prettier by using a couple of scripts from package.json
.
npm run git:hook
Now every time you make a commit the formatter will run. If you wish to run the formatter prior to commit (recommended) then just use the format script.
npm run format