A POC for using Cypress.
Requires Node.js.
Dependencies can then be installed via the following command:
npm i
Install:
- Prettier -
esbenp.prettier-vscode
- code formatting
Add the following file to the root of the project:
.vscode/settings.json
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
Run in an interactive UI mode:
npx cypress open
Run all - runs all of the tests in the command line:
npx cypress run
Run a tag - runs a subset of tests tagged in feature files:
npx cypress run --spec cypress/tests/api/api.cy.ts
Run headed - runs tests in the Cypress runner UI:
npx cypress run --spec cypress/tests/ui/ui.cy.ts --headed