- [Node.js] 4.2.x or above installed.
- Have Node.js installation path added to PATH environment variable.
All need node packages and its dependencies are specified in the package.json
file located in the repository root. So all you need is to run the following command from the repository root:
$ npm install
$ npx playwright install
If you want to execute the tests, you should type the next command in the terminal:
FRONT Playwright:
$ npm run playwright
BACK:
$ npm run backend
When the Cypress UI starts, double click on the test set you want to run, or click on run all specs to run all of them.
You should run the test on chrome browser (normally preselected)
We want you to create 1 scenario using the following Playwright projects. You can find the details of the expected steps as follows.
About the "way" of programming:
-
use clear variable names
-
avoid as much as possible hardcoding expected results or inputs
-
feel free to comment those functions you might consider not clear enough by its own name
-
add the assertions you may consider
-
First Scenario - Playwright:
Precondition: You are not logged in
- Go to https://www.saucedemo.com/
- Log in
- Press on the second article to access to the PDP page and verify the article has a title, description and price
- Add the article to the cart
- Verify the article is added
- Proceed with the order until completion
- Go to https://www.saucedemo.com/
We want you to create 1 scenario using this mocha project and the Axios lib. If you never used Axios before, find the documentation here https://www.npmjs.com/package/axios
You can find the details of the expected steps as follows.
About the "way" of programming:
-
use clear variable names
-
avoid as much as possible hardcoding expected results or inputs
-
feel free to comment those functions you might consider not clear enough by its own name
-
add the assertions you consider
-
Scenario:
- Do a GET on https://pokeapi.co/api/v2/pokemon/pikachu
- Verify the number of "moves" the pokemon has
- Verify the pokemon "types" is "electric"
- Do a GET on https://pokeapi.co/api/v2/pokemon/pikachu