Adjust cart quantities and apply FEAST50
Medium55 pts~2 min
- Scoped locators
- Steppers
- Coupons
- Recalculated totals
Practice app · FoodRush
A food-delivery app: set your delivery area through a native prompt, filter restaurants by veg-only, cuisine and search, sort them, customise dishes in a modal, manage a cart with a coupon, check out and follow a live order tracker before rating the meal.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
The cart already holds a Dosa Darbar order. Raise the Masala Dosa to 2, lower the Filter Coffee to 1, apply the FEAST50 coupon and verify every line of the bill.
Your task
- 1Open TEST_URL and open the cart (#nav-cart).
- 2In the Masala Dosa row ([data-testid="cart-line"][data-item-id="masala-dosa"]) click .qty-increase once so the quantity is 2.
- 3In the Filter Coffee row (data-item-id="filter-coffee") click .qty-decrease once so the quantity is 1.
- 4Type FEAST50 into #coupon-input and click #apply-coupon.
- 5Assert #bill-item-total is ₹380, #bill-delivery-fee is ₹40, #bill-taxes is ₹19, #bill-discount is −₹50 and #bill-grand-total is ₹389.
Acceptance criteria
- Masala Dosa has quantity 2 and Filter Coffee has quantity 1.
- #coupon-message confirms FEAST50 was applied.
- The item total is ₹380 and the grand total is ₹389.
- The test makes at least three assertions.
Fixtures
- Delivery area
- Any area name, e.g. Indiranagar
- Coupon
- FEAST50 (₹50 off item totals of ₹299 and above)
- Delivery fee
- ₹40 per order
- Taxes
- 5% GST & restaurant charges on the item total, rounded to the nearest rupee
- Seeded cart
- Dosa Darbar: Masala Dosa ×1 (₹120), Filter Coffee ×2 (₹60), Medu Vada ×1 (₹80)
- Checkout details
- Asha Verma · 9876543210 · 12, 4th Cross
- Tracking
- Order placed → Preparing → Out for delivery → Delivered, about 1.5 s per step
Playwright · Playwright Challenges · FoodRush