This project contains the Senior Automation Challenge project from Winston Cruz consists of the following:
- Automate 10 test cases for the Sauce Demo page using Screenplay Design Pattern.
The framework contains the following 10 test cases for the webapp https://www.saucedemo.com/:
Login
- Login with valid credentials
- Login with invalid credentials
- Logout
- Login with a locked out user
Products
- Add product to cart
- Remove product from cart
- Add multiple products to cart
- Remove multiple products from cart
- Checkout a product
- Checkout multiple product
The test case were documented on the Test Management Tool called TestCollab before proceeding the automation work. Feel free to request me the access to the test cases if needed.
- Javascript
- nodeJS
- Cypress
- cypress-plugin-api
- eslint
- eslint-plugin-cypress
- cypress-mochawesome-reporter
- GitHub Actions
- dotenv
- cypress-doten
Using SSH
git clone [email protected]:AlephCK/AutomationChallengeV3.git
Install all dependencies
npm install
We use the .env
to add the credentials used for the e2e specs tests:
CYPRESS_STANDARD_USER="standard_user"
CYPRESS_LOCKED_OUT_USER="locked_out_user"
CYPRESS_PASSWORD="secret_sauce"
The following commands can be used to run the test cases:
Open Cypress UI
npm run test:gui
Run the e2e tests (on Cypress Run mode)
npm run test
Run ESLint to fix any typos
npm run lint:fix
Run ESLint to look out for any typos
npm run lint