509
0
0
509
Back to All DomainsWorkspace: SPARSS Universal Platform
DOMAIN 02 · CLIENT PORTAL

Customer

Browse, cart, checkout, orders, account

0% Pass
Total Tests
158
Passed
0
Failed
0
Untested
158

Login Page

6 tests
TC-CUST-AUTH-001POS

Page renders role indicator defaulting to "Customer" and shows mobile + password fields

TC-CUST-AUTH-002POS

Submitting with role=dealer in URL logs in as dealer successfully

TC-CUST-AUTH-003NEG

Submit is blocked and validation error shown when mobile contains non-digit characters

TC-CUST-AUTH-004NEG

Submit is blocked and validation error shown when mobile is fewer than 10 digits

TC-CUST-AUTH-005NEG

Submit is blocked and validation error shown when password is too short

TC-CUST-AUTH-006NEG

Error toast is displayed when login fails (wrong credentials)

Registration

6 tests
TC-CUST-AUTH-007POS

Registration page renders with role defaulting to Customer

TC-CUST-AUTH-008POS

Referral mobile field is pre-filled and disabled when dealerref is present in URL

TC-CUST-AUTH-009POS

Valid customer registration submits successfully

TC-CUST-AUTH-010POS

Dealer registration redirects to the returned payment link

TC-CUST-AUTH-011POS

Supplier registration redirects to the returned payment link

TC-CUST-AUTH-012POS

Toast shown when supplier registration succeeds but no payment link is returned

Registration Pending

2 tests
TC-CUST-AUTH-013POS

Registration pending page shows neutral status message and link back to login

TC-CUST-AUTH-014NEG

Page does not crash when no query params are present

Forgot Password

1 tests
TC-CUST-AUTH-015POS

Full forgot-password flow: request OTP → verify OTP → reset password

Auth Session & Cache

5 tests
TC-CUST-AUTH-016POS

Login sets role and authenticated flag in store

TC-CUST-AUTH-017POS

Logout clears all auth state and React Query cache

TC-CUST-AUTH-018NEG

Login as a NEW user clears cached data from previous session

TC-CUST-AUTH-019POS

Login as the SAME user (token refresh) preserves existing cache

TC-CUST-AUTH-020NEG

Cross-tab login as different user triggers cache clear via storage event

Validation Schemas

8 tests
TC-CUST-AUTH-021POS

Login schema accepts valid 10-digit mobile and min-length password

TC-CUST-AUTH-022NEG

Login schema rejects mobile shorter than 10 digits

TC-CUST-AUTH-023NEG

Login schema rejects password shorter than minimum length

TC-CUST-AUTH-024POS

Customer register schema accepts a valid complete registration

TC-CUST-AUTH-025NEG

Customer register schema rejects missing required fields

TC-CUST-AUTH-026NEG

Forgot password schema requires mobile + userType

TC-CUST-AUTH-027NEG

OTP schema requires exactly 6 digits

TC-CUST-AUTH-028NEG

Reset password schema requires passwords to match

Captcha (Turnstile)

3 tests
TC-CUST-AUTH-029POS

Captcha token is empty on initial load

TC-CUST-AUTH-030POS

Setting token updates captcha state

TC-CUST-AUTH-031POS

Reset clears token and forces captcha re-render

Category Listing

3 tests
TC-CUST-HOME-001POS

Categories display correctly from API response

TC-CUST-HOME-002NEG

Empty/null/non-array API response returns empty category list

TC-CUST-HOME-003NEG

Category name falls back through text → categoryName → name → title → "Category N"

Product Listing & Price

7 tests
TC-CUST-SHOP-001POS

Product list shows mrpPrice — no discount subtraction (dealer commission stays hidden)

TC-CUST-SHOP-002POS

No strikethrough price shown for customer (no customer discount)

TC-CUST-SHOP-003POS

All in-stock measurements/variants from API are displayed

TC-CUST-SHOP-004POS

Single variant synthesised correctly when API returns only one measurement

TC-CUST-SHOP-005NEG

Variants are undefined when API returns no measurement data

TC-CUST-SHOP-006POS

Product detail page loads variants and gallery images from detail endpoint

TC-CUST-SHOP-007POS

Numeric measurement names (MySQL int) accepted without error

Seller Info

2 tests
TC-CUST-SHOP-008POS

Seller card built from supplierDetails without duplicate address parts

TC-CUST-SHOP-009POS

"No return window" shown when seller has disabled returns

Cart Page

6 tests
TC-CUST-CART-001POS

Loading spinner shown when cart is empty and data is loading

TC-CUST-CART-002POS

Empty state message shown when cart has no items

TC-CUST-CART-003POS

Cart items and order summary rendered when cart has entries

TC-CUST-CART-004POS

Checkout as unauthenticated user opens role-selection modal

TC-CUST-CART-005POS

Authenticated user goes directly to checkout without modal

TC-CUST-CART-006POS

Cart syncs with server on page load

Cart Item Behaviour

10 tests
TC-CUST-CART-007POS

Adding a new product creates a new cart line

TC-CUST-CART-008POS

Adding same product+variant again increases quantity on existing line

TC-CUST-CART-009POS

Adding same product with different variant creates a separate line

TC-CUST-CART-010NEG

Quantity capped at product stock maximum

TC-CUST-CART-011NEG

Quantity below 1 is normalised to 1

TC-CUST-CART-012POS

Removing an item deletes it from the cart list

TC-CUST-CART-013NEG

Removing unknown item ID does nothing (no-op)

TC-CUST-CART-014POS

Updating quantity changes line to target amount

TC-CUST-CART-015NEG

Updating quantity above max caps at max

TC-CUST-CART-016POS

Clear cart empties all items

Pricing

6 tests
TC-CUST-CART-017POS

Server-synced cart line uses server pricing

TC-CUST-CART-018POS

Unsynced (guest) cart line uses provisional GST split

TC-CUST-CART-019POS

Empty cart totals are all zero

TC-CUST-CART-020POS

Free-shipping items don't add shipping charge to total

TC-CUST-CART-021POS

Mixed paid + free-shipping lines totalled correctly

TC-CUST-CART-022NEG

GST defaults to 18% when GST info absent from API

Place Order

6 tests
TC-CUST-CHKOUT-001POS

Valid order placed successfully via /shop/checkout

TC-CUST-CHKOUT-002POS

Redirected to payment gateway when payment required

TC-CUST-CHKOUT-003POS

Callback URL returned as paymentLink when wallet covers full amount

TC-CUST-CHKOUT-004POS

Store pickup fields sent correctly when storeType=1

TC-CUST-CHKOUT-005NEG

Network/API errors surface to the user

TC-CUST-CHKOUT-006POS

Successful order invalidates wallet balance and orders cache

Order List

3 tests
TC-CUST-ORD-001POS

Customer order list loads from /customer/orders with status filter

TC-CUST-ORD-002NEG

Empty order list shows empty state

TC-CUST-ORD-003POS

Various API response shapes (tuple, envelope) all parsed correctly

Order Detail

5 tests
TC-CUST-ORD-004POS

Order detail loads and displays correctly

TC-CUST-ORD-005NEG

Order detail disabled when no orderId provided

TC-CUST-ORD-006NEG

Order detail returns null for missing/null data

TC-CUST-ORD-007POS

Invoice URL retrieved for completed order

TC-CUST-ORD-008NEG

Invoice URL returns null when no URL field in response

Order Actions

5 tests
TC-CUST-ORD-009POS

Customer can cancel an order

TC-CUST-ORD-010POS

Customer can raise a return request

TC-CUST-ORD-011POS

Customer can cancel a return request

TC-CUST-ORD-012POS

Order tracking loads timeline for given orderUUID

TC-CUST-ORD-013NEG

Tracking returns empty list when tracking data missing

Payment Status Page

5 tests
TC-CUST-PAY-001POS

Success state shown correctly when status=success

TC-CUST-PAY-002NEG

Pending/generic state shown when status param is missing

TC-CUST-PAY-003NEG

Failure state shown when status is not "success"

TC-CUST-PAY-004POS

Custom message from query param overrides default copy

TC-CUST-PAY-005POS

"Go to Login" link points to /login

Profile Schema Validation

12 tests
TC-CUST-PROF-001POS

Valid dealer profile accepted by schema

TC-CUST-PROF-002NEG

Missing first name rejected

TC-CUST-PROF-003NEG

Invalid email format rejected

TC-CUST-PROF-004NEG

Zipcode rejected if not exactly 6 digits

TC-CUST-PROF-005NEG

Zipcode with non-digit characters rejected

TC-CUST-PROF-006NEG

Blank Aadhaar number rejected

TC-CUST-PROF-007NEG

Aadhaar with wrong digit count rejected

TC-CUST-PROF-008POS

Aadhaar with spaces (auto-cleaned) accepted

TC-CUST-PROF-009NEG

Blank PAN rejected

TC-CUST-PROF-010POS

Valid PAN format (e.g. ABCDE1234F) accepted

TC-CUST-PROF-011NEG

Invalid PAN format rejected

TC-CUST-PROF-012NEG

Gender must be M / F / T for non-supplier role

Profile Actions

5 tests
TC-CUST-PROF-013POS

Profile loads with correct role data

TC-CUST-PROF-014POS

Updating profile invalidates cache and reloads

TC-CUST-PROF-015POS

Profile photo upload updates user record on success

TC-CUST-PROF-016NEG

Profile photo upload skips update when server returns no photo URL

TC-CUST-PROF-017POS

Occupation, state, firm lookup lists load correctly

Change Password

4 tests
TC-CUST-PWD-001POS

Customer password changed via customer endpoint

TC-CUST-PWD-002NEG

New password matching old password rejected

TC-CUST-PWD-003POS

Success message returned from server displayed

TC-CUST-PWD-004NEG

Default success message shown when server returns no message

Wallet Logs & Balance

6 tests
TC-CUST-WLLT-001POS

Wallet transaction logs load correctly for customer

TC-CUST-WLLT-002POS

Wallet balance displayed correctly

TC-CUST-WLLT-003NEG

Wallet balance shown from user record when logs are empty

TC-CUST-WLLT-004NEG

Empty state shown when log API returns empty array

TC-CUST-WLLT-005NEG

Error state + retry button shown when logs fetch fails

TC-CUST-WLLT-006NEG

Balance returns 0 when walletAmt field missing from response

Wallet Table (Customer)

5 tests
TC-CUST-WLLT-007POS

Wallet table shows: Order ID, Description, Sale Amount, Txn Charges, Net Amount, Balance, Date

TC-CUST-WLLT-008POS

Txn Charges cell highlighted in red when charges > 0

TC-CUST-WLLT-009POS

Txn Charges cell muted when charges = 0

TC-CUST-WLLT-010POS

Net Amount column labelled "Amount" for customer role

TC-CUST-WLLT-011POS

Clicking Order ID in ledger opens Order Details modal

Wallet Stats

2 tests
TC-CUST-WLLT-012POS

Wallet stats show total spent + refunds + order count

TC-CUST-WLLT-013NEG

Stats show zeros for empty wallet log

Mobile Card & Expanded Row

5 tests
TC-CUST-WLLT-014POS

Mobile wallet card shows Txn Charges, Final Balance, Sale Amount, Date

TC-CUST-WLLT-015POS

Expanding row shows Txn Charges + Full Description + Exact Timestamp

TC-CUST-WLLT-016NEG

Full Description row hidden when description is empty

TC-CUST-WLLT-017POS

"View Extra Details" toggles to "Hide Extra Details" on expand

TC-CUST-WLLT-018POS

Customer mobile card shows no commission info buttons

Withdrawal Service

4 tests
TC-CUST-WITH-001POS

Customer withdrawal list loads from /customer/withdrawals

TC-CUST-WITH-002POS

Customer withdrawal request submitted to /customer/withdrawal-request

TC-CUST-WITH-003NEG

"Not found" / "no data" / "empty" API errors return empty list (no crash)

TC-CUST-WITH-004NEG

Auth/server errors are propagated (not swallowed)

Bank Management

5 tests
TC-CUST-BANK-001POS

Public bank list loads and is cached locally

TC-CUST-BANK-002POS

Cached bank list returned without additional network call

TC-CUST-BANK-003NEG

Corrupt cache is ignored and data refetched

TC-CUST-BANK-004POS

Customer bank accounts loaded from customer endpoint

TC-CUST-BANK-005POS

IFSC code uppercased, primary flag coerced correctly

Map & Geocoding

9 tests
TC-CUST-ADDR-001POS

Light tile served by default, dark tile in dark mode

TC-CUST-ADDR-002POS

@2x tile requested only on high-density screens

TC-CUST-ADDR-003POS

Reverse geocode builds readable address from OSM tags

TC-CUST-ADDR-004NEG

Reverse geocode returns null when location carries no address

TC-CUST-ADDR-005NEG

Reverse geocode returns null instead of crashing on network failure

TC-CUST-ADDR-006NEG

Place search returns empty list on network failure (no crash)

TC-CUST-ADDR-007POS

IP location returns coordinates on success

TC-CUST-ADDR-008NEG

IP location rejected for unroutable IP (success-false body)

TC-CUST-ADDR-009NEG

Each geocoding call has a timeout (hung third-party can't block checkout)

Wishlist Store

7 tests
TC-CUST-WISH-001POS

Product added to wishlist successfully

TC-CUST-WISH-002NEG

Adding same product twice does not duplicate it

TC-CUST-WISH-003POS

Product removed from wishlist by ID

TC-CUST-WISH-004POS

Toggle adds product if absent, removes if present

TC-CUST-WISH-005POS

Clear wishlist empties entire list

TC-CUST-WISH-006POS

Wishlist persisted to localStorage for guest users

TC-CUST-WISH-007POS

Wishlist storage key scoped to user ID after login

Contact & Site Info

5 tests
TC-CUST-SUPP-001POS

Valid contact form submission accepted

TC-CUST-SUPP-002NEG

Contact form rejected when name is too short

TC-CUST-SUPP-003NEG

Contact form rejected when message is under 10 characters

TC-CUST-SUPP-004POS

Site info (call centre details) fetched and cached

TC-CUST-SUPP-005POS

Site info not re-fetched when already cached