Validate the delivery pincode check
Easy30 pts~2 min
- Input validation
- Negative and positive cases
- Clearing inputs
Practice app · FlipMart
An Indian electronics megastore: mobile-number + OTP login with an on-page SMS, an Electronics hover mega-menu, search autocomplete, listings with a price slider, brand filters, sort tabs and infinite scroll, a 3-product compare table, product pages with offers, pincode checks and rating breakdowns, a flash sale countdown, a login-gated wishlist, and a cart with UPI, card and Cash on Delivery checkout.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
On a product page, check that a 5-digit pincode is rejected and that a valid pincode shows the expected delivery date.
Your task
- 1Open TEST_URL and open Vexa Note 13 Pro 5G from Top deals on smartphones ([data-testid="deal-card"][data-product-id="vexa-note-13-pro"]).
- 2Type 56001 in #pincode-input and click Check (#pincode-check).
- 3Assert that #pincode-error reads “Please enter a valid 6-digit pincode”.
- 4Clear the field, type 560001 and click Check again.
- 5Assert that #delivery-info shows “Delivery by Thu, 12 Nov” for Bengaluru 560001 and that the error is gone.
Acceptance criteria
- The invalid pincode was rejected with a validation message.
- The valid pincode shows delivery by Thu, 12 Nov to Bengaluru 560001.
- No error is displayed at the end.
- The test makes at least two assertions.
Fixtures
- Mobile number
- 9876543210
- OTP
- 482913 (also shown in the on-page SMS)
- Account name
- Rohan Mehta
- UPI ID
- rohan@fmupi
- Saved address
- 221B, 12th Main Road, Indiranagar, Bengaluru - 560038
- Pincodes
- 560001 / 560038 Bengaluru · 110001 New Delhi · 400001 Mumbai · 600001 Chennai · 700001 Kolkata · 500001 Hyderabad
- Today
- Tuesday, 10 November 2026
Playwright · Playwright Challenges · FlipMart