This repository contains a simple and straightforward test suite for the Computer Database web application using Cypress, Cucumber, and TypeScript. This test suite was created as a part of the QA Engineer Cypress exercise to focus on the following functionality: adding a new computer.
To set up the project, follow the steps below:
-
Clone the repository:
git clone [email protected]:raphaeltoffano/QA.git
-
Change to the project directory:
cd QA
-
Install the dependencies:
yarn install
ornpm install
To run the tests using the Cypress Test Runner:
yarn cypress open
or
npm run cypress open
This will open the Cypress Test Runner, and you can click on the test file to run the tests in your browser.
To run the tests in headless mode:
yarn cypress run
or
npm run cypress run
This will run the tests in the command line without opening the Cypress Test Runner.
The test suite covers the following scenarios:
- Visit the computer's homepage and check the elements present on the page.
- Verify search functionality.
- Test an invalid search query.
- Add a computer.
- Attempt to add a computer without filling in the required fields.
The test scenarios are described in the cypress/e2e/computer-database.feature
file, and the corresponding test steps are implemented in the cypress/e2e/computer-database.ts
file.
During the test execution, the following bug was discovered:
- When creating a computer with only the name, it is not possible to find it in the search results.