Search RU
Tasks / Playwright / Cart: quantity and total
Statement medium

Cart: quantity and total

The cart page shows the product price, the quantity, and the total.

Write Playwright tests:

- on load the quantity is 1 and the total is 100;
- two clicks on "+" give quantity 3 and total 300;
- "−" does not take the quantity below 1.

Elements: `price`, `qty`, `total`, `plus`, `minus` — via `get_by_test_id`.

playwrightuistate
test_ui.py Python 3.14
AI mentor

The AI mentor is available after you log in: it sees your attempt history and does not spend resources on anonymous requests.

Log in and ask
Hints 1 of 3 unlocked · attempts: 0
Hint 1

The total depends on the quantity. Start by checking the initial state — it is a
cheap way to catch a wrong formula.

Hint 2 — unlocks after 1 attempt
Hint 3 — unlocks after 3 attempts