Pet-Shop Automated Tests.
This repository contains automated tests of a pseudo eCommerce pet shop web application using Cypress and TypeScript.
Before you begin, ensure you have the following:
- Node.js and npm installed (Node.js >= 12)
- Git (optional, but recommended)
-
Clone this repository:
git clone https://github.com/amosnjoroge/buckhill-qa-automation-eng-task.git
-
Navigate to the project folder:
cd buckhill-qa-automation-eng-task
-
Install the dependencies:
npm install
The following environment variables are required to run the tests:
- ADMIN_EMAIL = 'admin@buckhill.co.uk'
- ADMIN_PASSWORD = 'admin'
💬 Note
These variable have already been configure in the .env file. However, if you wish to change them, you can do so in this file.
To run all the tests locally in headless mode, run the following command:
npm run cy:run
To run all the tests locally in headed mode, run the following command:
npm run cy:open
This commands will launch the Cypress Test Runner and execute the test suite.
The project contains a Github Actions workflow that run the test in the CI. The workflow is triggered by the creation of a pull request. The workflow definition can be found here
💬 Note
In case of a failure the screenshot and videos are uploaded in the CI job's artifacts.
bugs/
- Contains bug reports found during testingcypress/
- Contains Cypress test filesintegration/
- Test scriptssupport/
- Custom commands and reusable utilitiescommands/
- Cypress custom commands; these are reusable functions that can be called from within the test scripts.selectors/
- Contains reusable selectors that can be called from within the test scripts..env
- Environment configurationcypress.config.ts
- Cypress configurationtsconfig.json
- TypeScript configurationpackage.json
- Project dependencies and scriptsREADME.md
- Project documentation (you are here)
- QA-1: None of the Main Navigation Bar Items Navigate to the Correct Page
- QA-2: Logged-In Users (Admin and Normal) Are Logged Out Upon Page Refresh
- QA-3: User Not Notified of Successful or Failed Registration
- QA-4: Error "Undefined array key 'category_uuid'" When Creating a Product by an Admin
- QA-5: User Receives "Failed to Create New Order" Error During Order payment
- QA-6: User Created by Admin Does Not Persist in the Database
- TC-001: User registration to create a new account.
- TC-002: Search products by product's title.
- TC-003: Viewing the detailed information page of a specific product
- TC-004: Viewing the detailed information page of a specific product
- TC-006: A registered user wants to view their latest orders categorised by their status.
- TC-007: An admin user wants to create a new customer user account.
- TC-008: An admin user wants to update a new customer user account.
- TC-009: An admin user wants to update a new customer user account.
- TC-010: An admin user wants to add a new product.
- TC-011: An admin user wants to edit a new product.