freshyo/docs/test-cases/addresses.md
2026-10-18 10:59:18 +05:30

4.6 KiB
Raw Permalink Blame History

Addresses, defaults and attached location

Scope: customer address CRUD, Me/Cart selectors, checkout summary, region/bound derivation from coordinates. Use disposable address fixtures and U1/U2. The current add/edit UI requires coordinates; legacy API clients may omit them and fall back to the region's effective bound. The region (City) and bound are derived from coordinates when present, pincode no longer exists, and State is fixed to Telangana in the UI.

ID Priority Action / input Expected result
ADDR-01 P0 First address created in A without Default tick. Region/bound derived from the address coordinates; becomes default; selectable for checkout.
ADDR-02 P1 Add second address, switch default, relaunch. Exactly one default consistent in every client.
ADDR-03 P1 Edit contact fields with omitted isDefault. Existing default flag retained; no incidental default loss.
ADDR-04 P1 Explicit default true/false update. Defined default policy, coherent flags and selected address.
ADDR-05 P0 Select A2 while browsing A1, then order. Selected address's bound supplies quote/server fee.
ADDR-06 P1 Create/edit B address while browsing A. Region and bound derived from the address coordinates, not the browsing region; no borrowed A bound.
ADDR-07 P1 Missing required contact/address fields. Specific validation; no partial address.
ADDR-08 P1 Phone length 9/10/11 and prefix 5/6/7/8/9. Current 10-digit 6–9 phone rule consistent UI/API (no pincode field).
ADDR-09 P1 Unicode/long address, spaces, punctuation, optional landmark. Agreed limits; complete persisted display, no silent truncation.
ADDR-10 P1 Open the form with no location, then attach the device location or pick on the map. Add Address stays disabled until a location is attached; the heading shows "Current Location Attached" vs "Location Attached from Map" by source; coordinates saved without overwriting text.
ADDR-11 P1 Deny location, invalid map link/coordinates or outside service. Recoverable error; previous valid location remains intact; out-of-area points refused.
ADDR-12 P0 U2 reads/updates/deletes/selects U1 address by ID. Ownership rejected; U1 state unchanged.
ADDR-13 P0 Only address/default/protected open-order address deletion. Required protections and explanatory message; no detached ongoing order.
ADDR-14 P1 Delete allowed nondefault unused address. Removed persistently; selection/discovery recomputed safely.
ADDR-15 P1 Delete referenced address after order cancelled/delivered. Approved dependency rule applied; history remains readable.
ADDR-16 P0 Foreign default address when browsing A. Not auto-selected; explicit switch confirmation required.
ADDR-17 P1 Cancel/confirm foreign-address region switch. Cancel preserves cart/address; confirm clears incompatible checkout state.
ADDR-18 P1 Legacy address with no stored bound; nonexistent bound; mismatched region/bound. Bound re-derived from the address coordinates; invalid/mismatched IDs rejected.
ADDR-19 P1 Two simultaneous default changes or first-address creations. Consistent approved default invariant; no partial duplicate details.
ADDR-20 P1 Address deleted/edited while checkout open. Submit revalidates owner/serviceability; no stale foreign bound quote.
ADDR-21 P1 Save timeout/background/retry after ambiguous response. Inspect persisted outcome; no silent duplicates or endless spinner.
ADDR-22 P1 Address change alters active browsing bound. Bound discovery refetched; B addresses excluded from A choice.
ADDR-23 P2 BottomDialog deletion error, keyboard/scroll, readonly checkout address. Message visible; editing not hidden behind wrong sheet.
ADDR-24 P1 Open the add form: City dropdown, State field, Submit before/after attaching a location. City lists the serviceable regions and pre-selects the current browsing region; State is fixed to Telangana and uneditable; coordinates must fall inside the chosen town (else rejected); Add Address disabled until a location is attached.
ADDR-25 P1 Signed-out user drafts an address, then logs in/registers. The draft is posted exactly once after authentication (first saved address becomes default); a failed sync keeps the draft for retry.

Policy checkpoint: the current UI requires coordinates and derives the bound from them; legacy coordinate-free rows may still order using the region's effective bound. Record the default-clearing vs keep-a-default behaviour rather than assuming both contradictory behaviours.