Cypress Laboratory for Alberto Basalo courses and workshops
Sample code for Cypress development courses by Alberto Basalo
git clone https://github.com/AlbertoBasalo/cy-lab
cd cy-lab
npm install
# run cypress interactive mode
npm start
# alternatively run cypress in headless mode
npm test# create new npm project
npm init -y
# add cypress as dependency
npm i cypress
# add typescript as dependency
npm i typescript
# add several dev dependencies
npm i -D @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-prettier eslint-plugin-prettier prettier
npm i -D @types/node
# add cypress open to start script and run it
npm startIt is a demo web app with simple but enough functionality. Get a clone, install the dependencies, and follow the instructions to start a local server.
npm i -D @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-prettier prettier typescripthttps://chromewebstore.google.com/detail/cypress-recorder/glcapdcacdfkokcmicllhcjigeodacab?pli=1
F1:command listCTRL+P: fileCTRL+T: search codeCTRL+K CTRL+Z: code commentCTRL+K CTRL+U: uncomment codeF12: go to definitionCTRL+Ñ: show hide terminalCTRL+B: show hide navigation barCTRL+K S: save al filesALT+up|down: move line