This is an end-to-end tests project. These tests are written in JavaScript with Cypress
- Page Object Pattern
- Visual regression tests
- Github Actions
- Report (mochawesome)
- node >= 12.18.x - how to install Node
- npm >= 6.14.x - how to install NPM
Install the dependencies:
npm install
Run e2e tests in headless mode (Electron):
npm run cy:run
─────────────────────────────────────────────────────────────────────────────────────────────────
Running: specs/LeaseBackCalculator.spec.js (1 of 2)
Should calculate the estimated cash proceeds value
✓ Calculates the estimated cash proceeds (White calculator) (5148ms)
1 passing (11s)
[mochawesome] Report JSON saved to /easyknock-challenge/cypress/results/json/mochawesome.json
─────────────────────────────────────────────────────────────────────────────────────────────────
Running: specs/LeaseBackCalculatorVisualRegression.spec.js (2 of 2)
Should show the calculator visually correct
✓ White calculator (3908ms)
2 passing (9s)
[mochawesome] Report JSON saved to /easyknock-challenge/cypress/results/json/mochawesome_001.json
Open Cypress and select what test do you want to run and what browser:
npm run cy:open
Run this command to generate the report in the directory ./cypress/reports/html/index.html
:
npm run cy:report
You can see the report on GitHub Pages