UI + API: build the bag by API, check out in the UI
App: TrendKart, a practice fashion marketplace (Myntra-style). Login: Guest checkout works; members: arya@trendkart.test / Trendy@123 or register. REST API: tests call it as /api/... through the request fixture or page.request; GET /api lists every endpoint ↗.
Interview scenario
"Checkout is the page that matters, so get there fast: put three tees in the bag and apply TRENDY10 with page.request, then open the bag, verify the price breakdown the customer sees, enter a delivery address, confirm the order, and check the order through the API."
Acceptance criteria
- With page.request: POST /api/bag/items { productId: 104, size: 'M', qty: 3 } and POST /api/bag/coupon { code: 'TRENDY10' }.
- page.goto('/bag'): one bag item, coupon discount -₹120 and total amount ₹1,077.
- Click PLACE ORDER, fill the delivery address, click CONFIRM ORDER and assert the order confirmation is visible.
- GET /api/orders with page.request: one order with totals.total 1077 and status confirmed.
🔒 This lab is part of Pro
Pro unlocks the live editor, the scenario checks and the reference solutions in Playwright and Selenium Java for all 37 labs, plus every interview answer. One payment of ₹1,299, lifetime access. Already on a lower tier? Upgrade for the difference.