freshyo/docs/test-cases/README.md
2026-11-05 22:31:05 +05:30

12 KiB
Raw Blame History

Feature test-case catalog

Purpose and status

This folder contains feature-by-feature acceptance and regression checklists for Freshyo's customer mobile/web apps, regional admin mobile/web apps, superadmin web app, backend, cache/jobs, and legacy fallback surfaces.

All cases are proposed and NOT RUN. A listed expected result is a requirement to verify, not a claim that the implementation currently satisfies it. Known review defects are intentionally covered. Documentation creation does not authorize running tests, placing real orders, sending notifications, deleting data, or applying migrations.

Inventory: 45 feature checklists and 855 uniquely identified cases, plus this index. Features are grouped by business responsibility; closely related operations share a checklist (for example stock, offer flags and suspension). Reuse the shared boundary/security matrix rather than assuming a finite list can cover every possible input.

Sources: current routers/screens/helpers, existing API tests, sanity plan, and branch review. Older sanity-plan statements that coupons ignore regions/SKUs are superseded here by the newer coupon requirements. Reviews remain conditional/legacy coverage. Checkout is COD-only; online payment is not part of this release.

How to use each checklist

  • Each case has a stable ID, priority, concrete action/input, and observable expected result.
  • P0: release-critical authorization, financial integrity, or core purchasing. P1: normal functional/edge regression. P2: resilience, presentation, compatibility, or conditional feature coverage. These are test priorities, not defect severities.
  • Run happy paths through the UI; validate persistence and security through authoritative API/read-only database evidence. Component tests alone do not prove end-to-end behavior.
  • Execute API checks even if a control is hidden in the UI. Repeat on every relevant client; web/native are separate implementations.
  • Record PASS, FAIL, BLOCKED, NOT RUN, or N/A in a separate run report. N/A needs a reason; BLOCKED is not a pass. Do not check off cases solely because a toast appeared.
  • For every rejected mutation, verify no partial row changes, sibling changes, image deletion, or unrelated-region writes.
  • For every money case, compare cart, checkout, success, persisted order, customer detail, and admin detail: goods − stored discount + delivery = payable per sub-order and in aggregate. Delivery is charged once per checkout group; no negative/nonfinite monetary values.
  • For cache cases, record authoritative value, region/bound, served version, and elapsed time. Use a bounded publication deadline (initial staging baseline: 120 seconds), not unbounded sleeps.
  • Treat policy-dependent cases as BLOCKED: POLICY until agreed. Never infer a product decision from a current bug.

Shared fixtures

Use isolated staging with dedicated DB/KV/assets/queues and sandbox recipients. Verify the actual API host before any mutation; do not use production credentials. Read secrets from approved environment configuration, never this documentation.

Fixture Required setup
Regions A and B; A1/A2 bounds with priorities 1/2 and different fees; B1; valid interior, exterior, edge and overlap coordinates.
Identities Anonymous, customers U1/U2, new customer U0, suspended disposable customer, regional admins A/B, supported staff roles, superadmin.
Products A-only P with two SKUs, B-only Q, global G with independent A/B prices; regular-only R; flash F with a distinct price; combo C and combo-only component K.
Availability Available, OOS, globally suspended, regionally suspended, soft-deleted variants; preserve a historical order referencing one.
Slots Two valid A slots S1/S2, B slot, inactive/frozen/full/past slots, and midnight-boundary times.
Addresses U1 in A1/A2/B1; U2-only address; default and sole-address fixtures; legacy address without a stored bound; a zero-address signed-in customer for the cart gate. Coordinates are required by the current add/edit UI; legacy API-created rows may omit them and fall back to the region's effective bound.
Coupons Regional A/B and global; percentage/flat; targeted/whole-cart; capped, min-spend, exclusive, first-order, limited-use, user-only, expired/invalidated, reserved.
Orders Pending COD, packaged, verified, delivered, cancelled, multi-slot group; no online-payment or refund fixtures.
Money T = free threshold, D = fee; test T−0.01, T, T+0.01. Example goods: ₹100 targeted + ₹900 unrelated. Separate regular/flash values.
Content Tags, groups, active/inactive banners, images, supported notification links, complaints and incident fixtures.

Use unique run prefixes. Do not delete regions for cleanup: region deletion is unsupported. Never run migrations as test setup. Keep shared fixtures intact; clean only approved disposable data. Use time-relative slots/expiry dates with margins, except deliberate exact-boundary cases.

Feature index

Area Checklist
Identity Customer authentication, Profile/account lifecycle, Staff authentication, Staff management
Geography Regions, Bounds, Location and switching, Constants
Catalog administration Regional stores, Global stores, Regional products, Global products/elevation, Prices/stock/suspension, Combos
Merchandising Catalog/search, Tags/order, Groups, Banners
Purchasing Slots, Cart, Addresses, Checkout, Pricing, Flash
Coupons Administration, Eligibility/stacking, Stacking & cart guards, Reserved/cancellation coupons
Order operations Placement/history, Fulfillment, Cancellation, Edits/rebalance, Delivery sequence/maps
Support Complaints, Customer operations/incidents, Notifications (EXCLUDED from automated run — see below)
Infrastructure Uploads, Cache publication, Jobs/health (queue/scheduler cases EXCLUDED — see below), Security, Recovery/platform/accessibility
Conditional/legacy Reviews, Fallback/legacy pages (EXCLUDED — see below)
Approval-required provider integration OTP authentication (isolated provider sandbox only; excluded from default password regression)
Excluded from automated regression Notifications/push (skipped by owner instruction for the 2026-10-18 run; cases retained, marked SKIPPED, never PASS/FAIL)

Excluded checklists

The following checklists are not executed by the automated harness and their cases are reported as SKIPPED (not PASS/FAIL/NOT RUN):

  • OTP authentication — needs an isolated SMS/OTP provider sandbox; excluded from the default password suite.
  • Notifications / push — needs real push delivery to devices/recipients; excluded by owner instruction (2026-10-18). The cases are retained verbatim so they can be run manually in an isolated provider sandbox when explicitly authorised.
  • Queue / scheduled-job cases in Jobs/health (JOB-03–JOB-10, JOB-12–JOB-15) — excluded by owner instruction (2026-10-18); no scheduler/queue harness is exercised automatically. The health/startup cases JOB-01, JOB-02, JOB-11 remain in scope.
  • Fallback/legacy standalone pages (LEGACY-01–LEGACY-14) — excluded by owner instruction (2026-10-18); apps/fallback-ui is out of scope for this release cycle and is not started.

SKIPPED is neither a pass nor a failure and must not be counted as coverage.

Policy checkpoints

  • Discounts round to the nearest rupee; per-sub-order shares allocate whole rupees and reconcile exactly to the charged discount.
  • Coupons stack sequentially on the remaining eligible amount, in the customer's selection order. Each coupon's cap applies to its own reduced base; reversing the order can change the result.
  • Global coupon targeting regional products: confirm intended authoring restrictions; never permit a regional author to attach another region's private SKU.
  • Combo component availability, group-to-slot snapshot/live membership, global-name uniqueness/case normalization, and account-switch cart behavior need explicit decisions where not specified.
  • No general minimum order value is required by the current policy. Coupon minOrder is independent from free-delivery thresholds.
  • Native never persists the browsing region: each launch re-derives it from the device location and/or the default address (see location and switching). Web persists the selected region in freshyo-region and validates it against listRegions.
  • UI duplicate-submit prevention is required. Server order-idempotency was previously deferred: record concurrent API behavior and ambiguous-retry exposure, not an assumed guaranteed deduplication.
  • Define concurrency guarantees for capacity, default-address updates, limited coupons, and reserved redemption. Financial/one-time invariants must not silently be weakened to match observed races.

Known-defect regression mapping

Review issue Cases
Customer search bypasses regional isolation CUSTOMER-17
Web discovery input mismatch CFG-01, CAT-01, CACHE-01
Global SKU ID stripped on edit GP-03, GP-04
Rejected regional edit deletes global store image GSTORE-15
Regional cache request narrows a global regeneration CACHE-23, JOB-15
Web scheduled checkout submits null slot IDs CHECK-22
New-region cache generation detached from request REGION-16
Global-product create/edit draft bleed GP-21
Quiet-region orders hidden by global ID window ORDER-21
Startup region adoption clears persisted cart CART-11, LOC-09, LOC-21
Unrelated market edit clears regional suspension STOCK-07, STOCK-08
Overlapping coupons/negative sub-orders CPA-14, MONEY-12, CSQ-06, CSQ-11
Uncapped mobile preview CPA-15, MONEY-13
Historical discount backfilled as zero ORDER-22 (accepted limitation)
Global coupon type switch keeps old discount CPM-21
Admin-web reload loses staff identity/region SAUTH-15
Superadmin admin notification uses staff-only endpoint PUSH-19
Customer can reach admin protected procedures SEC-28
Global SKU rejected by bulk prices STOCK-03, STOCK-04
Targeted minOrder uses whole cart in UI CPA-07, CPA-08

Run-report template

Run ID / date / code revision:
Environment / verified API host / client build:
Case ID / client / identity / region / bound:
Fixture IDs and relevant pre-state:
Actions and exact inputs:
Expected / actual:
Status and reason:
API status/body, persisted values, versions, timestamps:
Screenshot/log links (redacted):
Cleanup / retained evidence / linked defect:

Recommended first pass: AUTH-01, CFG-01, LOC-19, CUSTOMER-17, GP-03, GP-21, STOCK-03, STOCK-07, SLOT-01, CART-01, ADDR-01, CHECK-01, CHECK-22, MONEY-01, CPA-01, CPA-07, CPA-14, ORDER-01, FUL-01, CANCEL-01, SEC-01, SEC-28, CACHE-01, CACHE-23, REGION-16. Then execute all P0 cases before release and the remaining applicable cases in the full regression run.