- Open the forked repo in VSCode.
- Create a new branch: git checkout -b added_article_test
- Run the installation commands
npm ci
&npx playwright install
.
- Create
fixtures.ts
file under the./tests/fixtures
folder. - Create fixtures for the page classes initialization:
- menuPage
- cartPage
- Create
constants.js
file under the./src
folder:
- This file should export a constant object of coffee prices, example: { espresso: 10, cappucino: 19}.
- Create helper method
getPriceForQuantity
undersrc/common/helpers/getPriceForQuantity.ts
folder. This file should have three functions: unitPriceFormatStr, priceFormatStr, totalPriceFormatStr
- First: get as input unitPrice and unitsNumber, return a formatted price, example of output:
10.00 x 1
. - Second: get as input unitPrice, return a formatted price, example of output:
$10.00
. - Third: get as input unitsNumber, return a formatted price, example of output:
Total: $10.00
.
- Update all the tests to use corresponiding fixtures for classes initialization.
- Update all the tests to use prices from constants and price formatting methods instead of hard-coded prices.
- Re-run all your tests and make sure they pass after the updates.
- Add and commit all your updates.
- Push the code to the origin.
- Create PR for your changes.
- Fix all the suggestions from the Code review until PR is approved.