enh
This commit is contained in:
parent
d892cfbc2b
commit
12134a8128
47 changed files with 1389 additions and 0 deletions
111
docs/multi-region-i2-review.md
Normal file
111
docs/multi-region-i2-review.md
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
# MULTI_REGION_I2 code review
|
||||
|
||||
## Scope and result
|
||||
|
||||
- Comparison: `main...HEAD`
|
||||
- Reviewed HEAD: `d892cfbc2b1c6c4b2bccaf32b368013393a8e139`
|
||||
- Base main: `a09cb936c09d728d76063023b4ec89aed426e8f8`
|
||||
- Focus: discovery contracts, global-product editing, regional market data, and coupon pricing/checkout.
|
||||
- Result: **7 confirmed outstanding findings: 3 P1 and 4 P2.**
|
||||
- This is a static review, not an exhaustive validation of every changed file. No test suites, builds, or migrations were run during this re-review. No application code was changed.
|
||||
- The unrelated uncommitted Expo cache file was excluded from the branch review.
|
||||
|
||||
P1 means a high-priority functional or financial correctness issue. P2 means a normal-priority correctness issue under the described scenario.
|
||||
|
||||
## Resolved finding from the previous review
|
||||
|
||||
### Shared pricing exports are now committed
|
||||
|
||||
`packages/shared/index.ts:22–23` now exports `./cart-pricing`. The previous finding that a clean checkout lacks the shared pricing exports is resolved and is not counted below.
|
||||
|
||||
## Outstanding findings
|
||||
|
||||
### R1 — [P1] Web discovery sends regionId where the backend requires boundId
|
||||
|
||||
**Location:** `apps/web-ui/src/hooks/prominent-api-hooks.ts:25–27`
|
||||
|
||||
**Scenario:** Open the web storefront and select a browsing region.
|
||||
|
||||
The hook calls `common.essentialConsts` with `{ regionId }`. The backend input schema in `apps/backend/src/trpc/apis/common-apis/common-trpc-index.ts:267–278` requires a positive `boundId`. The `as any` bypasses compile-time checking but not Zod validation, so the discovery request fails. With no discovery response, the cache URL builders cannot obtain the asset domain and version values, blocking catalog, availability, and slot loading on a fresh session.
|
||||
|
||||
**Suggested fix:** Resolve the applicable delivery/browsing bound, send `{ boundId }`, and enable the query only when that bound is available. Remove the cast hiding the contract mismatch. Keep the bound in the query input so switching bounds refreshes delivery constants.
|
||||
|
||||
**Verification:** A fresh web session can load the selected region's catalog, and switching between bounds refreshes the bound-specific delivery settings.
|
||||
|
||||
### R2 — [P1] Global-product updates strip existing SKU IDs and insert duplicates
|
||||
|
||||
**Location:** `apps/backend/src/trpc/apis/superadmin-apis/apis/global-products.ts:95–107`
|
||||
|
||||
**Scenario:** A superadmin saves an existing global product after changing an image, feature, or suspension flag.
|
||||
|
||||
The update schema uses `skuInput`, which does not declare an `id` field. Zod strips unknown properties, including the SKU IDs sent by the UI. Consequently `(sku as any).id` is undefined in the handler. The database helper's existing-SKU branch at `packages/db_helper_sqlite/src/admin-apis/product.ts:663–674` is skipped, and the new-SKU branch at lines 731–751 inserts duplicate variants and market-stat rows. The original variants remain unchanged; an original SKU can remain orderable even when the intended edit suspends its replacement.
|
||||
|
||||
**Suggested fix:** Define an update SKU schema that preserves an optional positive integer `id`, and map its typed field directly. Validate that supplied existing IDs belong to the edited product; only variants intentionally lacking an ID should be inserted.
|
||||
|
||||
**Verification:** Editing an existing variant preserves its ID and the product's SKU count. Adding one new variant increases the count by exactly one.
|
||||
|
||||
### R3 — [P1] Overlapping targeted coupons can create negative sub-order totals
|
||||
|
||||
**Location:** `packages/shared/cart-pricing.ts:158–181`
|
||||
|
||||
**Scenario:** A scheduled cart has ₹100 of SKU A in one slot and ₹900 of unrelated goods in another slot. Two nonexclusive ₹100 coupons both target SKU A.
|
||||
|
||||
Each coupon is calculated against the original ₹100 eligible subtotal and allocates ₹100 to the first sub-order. The combined ₹200 discount is below the ₹1,000 whole-cart subtotal, so the global cap does not run. The first sub-order receives ₹200 of discount on ₹100 of goods and stores a **−₹100 total**; the unrelated sub-order still costs ₹900. This effectively uses the targeted coupons to offset goods outside their targets and persists an invalid negative payable sub-order.
|
||||
|
||||
**Suggested fix:** Track remaining discountable value per line when applying coupons, allocating only discounts that those eligible lines can absorb. Derive coupon shares, sub-order discounts, and the cart total from the same capped allocation. A whole-cart cap or a final zero clamp alone does not enforce product targeting.
|
||||
|
||||
**Verification:** In the example, SKU A can receive at most ₹100 combined discount; the unrelated goods remain ₹900 and every sub-order total is nonnegative. Also verify partially overlapping target sets.
|
||||
|
||||
### R4 — [P2] Mobile cart and checkout previews omit the combined discount cap
|
||||
|
||||
**Locations:**
|
||||
|
||||
- `apps/user-ui/components/checkout-page.tsx:230–244`
|
||||
- `apps/user-ui/components/cart-page.tsx:434–448`
|
||||
|
||||
**Scenario:** A ₹100 cart has two eligible nonexclusive ₹80 flat coupons.
|
||||
|
||||
The UI sums the individual discounts to ₹160 and displays a −₹60 goods total before delivery. The backend's `computeCartPricing` caps the combined discount at ₹100. The customer therefore sees a different payable amount from the stored order, and delivery-threshold calculations can also diverge because they use the uncapped preview total.
|
||||
|
||||
**Suggested fix:** Use the shared cart-pricing result in both screens instead of independently summing `computeCouponDiscount` results. Ensure the pricing lines are the same available items that will actually be submitted.
|
||||
|
||||
**Verification:** Cart, checkout, and stored order agree when multiple coupons exceed the goods subtotal, including cases where the delivery threshold is affected.
|
||||
|
||||
### R5 — [P2] Reopening a global product loses its regional suspension state
|
||||
|
||||
**Location:** `packages/db_helper_sqlite/src/admin-apis/product.ts:198–200`
|
||||
|
||||
**Scenario:** A regional admin enables “Suspend in my region” for a globally unsuspended SKU, saves it, reopens it, and saves an unrelated price edit.
|
||||
|
||||
`mapSku` returns `sku.isSuspended` but omits `marketStats.isSuspendedInRegion`. The regional form initializes its checkbox from `sku.isSuspended` (`apps/admin-ui/src/components/GlobalProductForm.tsx:37–48`), so the saved regional suspension appears false after reopening. Submitting the price edit sends false, and `updateProductMarketDataForRegion` at `packages/db_helper_sqlite/src/admin-apis/product.ts:535–541` clears the regional suspension, making the SKU available again.
|
||||
|
||||
**Suggested fix:** Expose global and regional suspension flags separately in the admin response. Initialize and submit the regional checkbox using `isSuspendedInRegion`, and represent the global kill-switch independently. Apply the same distinction in both regional admin clients.
|
||||
|
||||
**Verification:** A regional suspension survives reopening and unrelated edits. A global suspension does not incorrectly initialize or write the regional flag.
|
||||
|
||||
### R6 — [P2] Prices Overview rejects global SKUs included in its listing
|
||||
|
||||
**Location:** `packages/db_helper_sqlite/src/admin-apis/product.ts:1255–1258`
|
||||
|
||||
**Scenario:** A regional admin edits a global SKU's price or flash availability through Prices Overview, either alone or in a batch with regional SKUs.
|
||||
|
||||
The listing includes global products, but bulk-price validation only accepts products whose `regionId` equals the staff region. Global products have a null region, so they are reported as invalid and the entire batch is rejected. This also prevents valid regional changes in the same batch from being saved. The subsequent market-stat writes are already scoped to the authenticated region.
|
||||
|
||||
**Suggested fix:** Accept SKUs whose parent product is global or belongs to the authenticated region, while continuing to reject another region's regional SKUs. Keep the existing region-scoped writes.
|
||||
|
||||
**Verification:** A mixed global/regional batch saves only the authenticated region's market data; another region's regional SKU remains rejected.
|
||||
|
||||
### R7 — [P2] Targeted-coupon eligibility still compares minOrder with the whole cart
|
||||
|
||||
**Locations:**
|
||||
|
||||
- `apps/user-ui/components/checkout-page.tsx:182–185`
|
||||
- `apps/user-ui/components/cart-page.tsx:284–286`
|
||||
|
||||
**Scenario:** A coupon requires ₹200 of its targeted SKU, but the cart contains only ₹50 of that SKU plus ₹300 of unrelated goods.
|
||||
|
||||
Both screens mark the coupon eligible because they compare `minOrder` with the whole-cart subtotal. The backend correctly compares it with the ₹50 eligible subtotal in `packages/db_helper_sqlite/src/user-apis/order.ts:187–202`, so placing the order fails after the UI has offered and displayed the coupon. Coupons with no matching cart lines are also not disabled by this eligibility calculation.
|
||||
|
||||
**Suggested fix:** Use `computeEligibleSubtotal` over the actual effective-price, available checkout lines for both the minimum requirement and target-match check. Align the cart and checkout eligibility rules with server validation.
|
||||
|
||||
**Verification:** The example coupon is disabled with the appropriate minimum explanation; a targeted coupon with no matching items is unavailable; flash-priced eligible lines use their flash price.
|
||||
97
docs/test-cases/README.md
Normal file
97
docs/test-cases/README.md
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
# 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, sending notifications, charging payments, deleting data, or applying migrations.
|
||||
|
||||
Inventory: **45 feature checklists and 804 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](../e2e-sanity-test-plan.md), and [branch review](../multi-region-i2-review.md). Older sanity-plan statements that coupons ignore regions/SKUs are superseded here by the newer coupon requirements. Vendor snippets and reviews remain conditional/legacy coverage; online gateway cases are readiness coverage until implementation is enabled.
|
||||
|
||||
## 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; boundless legacy address; default and sole-address fixtures; coordinate-free address. |
|
||||
| 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; payment/refund fixtures only in approved sandbox. |
|
||||
| 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](customer-authentication.md), [Profile/account lifecycle](profile-account-lifecycle.md), [Staff authentication](staff-authentication.md), [Staff management](staff-management.md) |
|
||||
| Geography | [Regions](regions.md), [Bounds](bounds.md), [Location and switching](location-region-switching.md), [Constants](constants-configuration.md) |
|
||||
| Catalog administration | [Regional stores](regional-stores.md), [Global stores](global-stores.md), [Regional products](regional-products.md), [Global products/elevation](global-products.md), [Prices/stock/suspension](prices-stock-suspension.md), [Combos](combos.md) |
|
||||
| Merchandising | [Catalog/search](catalog-search.md), [Tags/order](product-tags-ordering.md), [Groups](product-groups.md), [Banners](banners.md) |
|
||||
| Purchasing | [Slots](scheduled-slots.md), [Cart](cart.md), [Addresses](addresses.md), [Checkout](checkout.md), [Pricing](pricing-delivery-fees.md), [Flash](flash-delivery.md) |
|
||||
| Coupons | [Administration](coupon-management.md), [Eligibility/stacking](coupon-application.md), [Reserved/cancellation coupons](reserved-coupons.md) |
|
||||
| Order operations | [Placement/history](orders.md), [Fulfillment](fulfillment.md), [Cancellation](cancellation.md), [Edits/rebalance](order-edits-rebalance.md), [Delivery sequence/maps](delivery-operations.md), [Payment/refund readiness](payments-refunds.md) |
|
||||
| Support | [Complaints](complaints.md), [Customer operations/incidents](customer-management-incidents.md), [Notifications](notifications.md) |
|
||||
| Infrastructure | [Uploads](uploads-images.md), [Cache publication](cache-publication.md), [Jobs/health](jobs-health.md), [Security](authorization-api-contracts.md), [Recovery/platform/accessibility](recovery-platform-accessibility.md) |
|
||||
| Conditional/legacy | [Vendor snippets](vendor-snippets.md), [Reviews](reviews.md), [Fallback/legacy pages](fallback-legacy-pages.md) |
|
||||
| Approval-required provider integration | [OTP authentication](otp-authentication.md) (isolated provider sandbox only; excluded from default password regression) |
|
||||
|
||||
## Policy checkpoints
|
||||
|
||||
- Currency rounding and residual allocation: choose a consistent minor-unit policy; don't assert an invented rounding mode.
|
||||
- Percentage stacking: confirm whether successive percentages use original or remaining eligible value. Regardless, targets, caps, nonnegative totals, and client/server agreement are mandatory.
|
||||
- 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.
|
||||
- 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 |
|
||||
|---|---|
|
||||
| Web discovery input mismatch | CFG-01, CAT-01, CACHE-01 |
|
||||
| Global SKU ID stripped on edit | GP-03, GP-04 |
|
||||
| Overlapping coupons/negative sub-orders | CPA-14, MONEY-12 |
|
||||
| Uncapped mobile preview | CPA-15, MONEY-13 |
|
||||
| Regional suspension lost on reopen | STOCK-07, STOCK-08 |
|
||||
| Global SKU rejected by bulk prices | STOCK-03, STOCK-04 |
|
||||
| Targeted minOrder uses whole cart in UI | CPA-07, CPA-08 |
|
||||
|
||||
## Run-report template
|
||||
|
||||
```text
|
||||
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-06, GP-03, STOCK-03, STOCK-07, SLOT-01, CART-01, ADDR-01, CHECK-01, MONEY-01, CPA-01, CPA-07, CPA-14, ORDER-01, FUL-01, CANCEL-01, SEC-01, CACHE-01. Then execute all P0 cases before release and the remaining applicable cases in the full regression run.
|
||||
31
docs/test-cases/addresses.md
Normal file
31
docs/test-cases/addresses.md
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# Addresses, defaults and attached location
|
||||
|
||||
Scope: customer address CRUD, Me/Cart selectors, checkout summary, bound/region assignment and coordinates. Use disposable address fixtures and U1/U2.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| ADDR-01 | P0 | First address created in A without Default tick. | Correct region/bound; 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 coherently; 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; pincode 5/6/7 digits. | Current 10-digit 6–9 phone and 6-digit pincode rules consistent UI/API. |
|
||||
| ADDR-09 | P1 | Unicode/long address, spaces, punctuation, optional landmark. | Agreed limits; complete persisted display, no silent truncation. |
|
||||
| ADDR-10 | P1 | No coordinates, then attach allowed GPS/Maps location. | Accurate warning; successful coordinates saved without overwriting text. |
|
||||
| ADDR-11 | P1 | Deny location, invalid map link/coordinates or outside service. | Recoverable error; previous valid location remains intact. |
|
||||
| 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 null-bound address, nonexistent bound, mismatched region/bound. | Allowed null fallback; 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. |
|
||||
|
||||
Policy checkpoint: whether missing coordinates blocks checkout, and default clearing versus the requirement to keep a default. Record ambiguity rather than assuming both contradictory behaviors.
|
||||
41
docs/test-cases/authorization-api-contracts.md
Normal file
41
docs/test-cases/authorization-api-contracts.md
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
# Authorization, isolation and API contracts
|
||||
|
||||
Scope: all public/customer/staff/superadmin procedures, ownership, current staff assignments and mutation failures. These are direct API checks; hidden screens do not prove enforcement.
|
||||
|
||||
## Identity matrix
|
||||
|
||||
For **each relevant route**, test anonymous, U1, U2, staff A, staff B, superadmin, expired token and deleted/reassigned identity. Public discovery is public; customer private data is owner-scoped; regional operations are staff-region-scoped; global authoring/configuration is superadmin-only. Exact staff-role privileges need a documented policy matrix, not assumed universal access.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| SEC-01 | P0 | Anonymous/customer calls every admin/superadmin mutation. | Denied before DB/assets/job writes; no private payload. |
|
||||
| SEC-02 | P0 | Regional staff calls superadmin region/staff/global CRUD/config. | No escalation, including legacy global-config endpoints. |
|
||||
| SEC-03 | P0 | Staff B probes A product/store/slot/tag/group/banner/coupon IDs. | Read/write/delete denied; no existence-sensitive private content. |
|
||||
| SEC-04 | P0 | Authorized A object save with B SKU/store/group/related IDs. | Entire invalid association rejected without hidden partial writes. |
|
||||
| SEC-05 | P0 | U2 probes U1 address/order/complaint/payment/coupon IDs. | Ownership always enforced, including signed payment callbacks. |
|
||||
| SEC-06 | P0 | Forged/expired/malformed JWT, altered identity/region/role fields. | Verification fails; no default or fallback privilege. |
|
||||
| SEC-07 | P0 | Removed staff/deleted user token; staff reassigned A→B. | Current identity/assignment enforced; old region claim not trusted alone. |
|
||||
| SEC-08 | P0 | Regional edit of global product structural fields/global suspension. | Only authorized market fields writable; globally shared structure protected. |
|
||||
| SEC-09 | P0 | Public catalog/detail/summary upload/token routes inspected. | Only intended public fields/contexts; no internal notes or credentials. |
|
||||
| SEC-10 | P0 | Mixed-region checkout and foreign address-bound pairing. | Coherent region/address/SKU/slot/bound validation; no fee manipulation. |
|
||||
| SEC-11 | P0 | Item packaging with unrelated item ID or vendor authority. | Item association/allowed snippet scope checked server-side. |
|
||||
| SEC-12 | P0 | Invalid/empty ID, whitespace/numeric-prefix string, huge/nonfinite IDs. | Schema rejects malformed identity; no accidental parseInt target. |
|
||||
| SEC-13 | P1 | Unknown key, wrong-scope constant key, incorrect type, null vs omission. | Contract explicit; unexpected write fields don't bypass restrictions. |
|
||||
| SEC-14 | P0 | Customer-supplied money, creator ID, user ID, cancellation actor. | Server-owned fields not trusted; financial/audit identity correct. |
|
||||
| SEC-15 | P0 | Business rejection OOS/full slot/protected delete/invalid coupon. | Correct actionable 4xx/error contract, no misleading 500 or success. |
|
||||
| SEC-16 | P0 | Failure at each relation/image/status write boundary. | No partial row or asset deletion; unauthorized scope untouched. |
|
||||
| SEC-17 | P1 | Duplicate deletes/toggles/cancels, concurrent conflicting requests. | Defined conflict/idempotence; no duplicate financial/history side effects. |
|
||||
| SEC-18 | P0 | Limited-use coupon and reserved redemption races. | Authoritative one-time/per-user invariants; no overuse/dual claim. |
|
||||
| SEC-19 | P1 | Large arrays/string payloads and unsupported query/page limits. | Bounded safe validation; no dropped/partial unreported batches. |
|
||||
| SEC-20 | P0 | Script/HTML in names/notes/links/filenames. | Safe rendering/navigation/storage; no script execution or arbitrary object delete. |
|
||||
| SEC-21 | P0 | SQL-special strings/filter/order input. | Parameterized/safe handling; no injection or unintended query scope. |
|
||||
| SEC-22 | P0 | Private response/error/log inspection. | No password hashes, signed secrets, full tokens, other-user PII. |
|
||||
| SEC-23 | P1 | Untrusted browser origin and supported CORS/auth transport. | Approved origin policy; credential handling secure; no unintended cross-origin mutation. |
|
||||
| SEC-24 | P1 | Repeated auth/code requests in approved bounded harness. | Approved rate/abuse controls; no real SMS/notification flood. |
|
||||
| SEC-25 | P0 | Reads/mutations after UI logout or account switch with cached queries. | Private stale data cleared; API still denies unauthorized access. |
|
||||
| SEC-26 | P1 | Public health/legacy operational/deep-link routes. | Sensitive operations require intended authority, not merely knowledge of URL. |
|
||||
| SEC-27 | P1 | Authorization failure followed by valid retry. | No poisoned transaction/loading guard; valid request succeeds once. |
|
||||
|
||||
## Evidence requirements
|
||||
|
||||
For each denial, record sanitized status/body plus target and sibling pre/post values. For list authorization, test filters, pagination and direct-ID endpoints, not only the default list. For global entities, distinguish intentionally public/shared structural reads from prohibited writes. Record capacity and order-idempotency deferred policies separately; do not replace specified one-time coupon protections with characterization of an existing race.
|
||||
22
docs/test-cases/banners.md
Normal file
22
docs/test-cases/banners.md
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Banners and promotional navigation
|
||||
|
||||
Scope: admin banner CRUD, active state/order, assets and customer click-through.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| BANNER-01 | P1 | Create inactive banner, then activate with valid image/products. | Not shown as active before activation; correct A banner afterwards. |
|
||||
| BANNER-02 | P1 | Tap banner from Home/flash surface if supported. | Intended product/content route; correct SKU/region. |
|
||||
| BANNER-03 | P1 | Edit image, links, active state and sequence. | Updated order/content after refresh; no stale navigable image. |
|
||||
| BANNER-04 | P0 | A banner references foreign B store/SKU; B edits A banner. | Cross-region association/access denied. Global targets accepted where allowed. |
|
||||
| BANNER-05 | P1 | Empty/missing/invalid image or unknown product IDs. | Validation and useful empty behavior; no broken published banner. |
|
||||
| BANNER-06 | P1 | Duplicate sequence/order, multiple active banners. | Defined deterministic sorting; no duplicated carousel entry. |
|
||||
| BANNER-07 | P1 | Target deleted/suspended while banner remains active. | Safe filtered destination/not-found fallback; cannot order hidden item. |
|
||||
| BANNER-08 | P1 | Delete/deactivate banner while customer carousel is open. | Refresh removes it; stale tap safely handled. |
|
||||
| BANNER-09 | P1 | Invalid/unclaimed replacement upload key. | Failed edit leaves original image and banner intact. |
|
||||
| BANNER-10 | P1 | Delete image cleanup fails. | DB deletion result explicit; no permanent undeletable banner. |
|
||||
| BANNER-11 | P0 | External/javascript-like malformed destination where links supported. | Only allowed navigation schemes; no script execution. |
|
||||
| BANNER-12 | P1 | Save timeout/double create/concurrent reorder. | No half-created relation or unintended duplicate record. |
|
||||
| BANNER-13 | P2 | Carousel swipe, autoplay if supported, orientation/text scale. | Accessible controls and stable readable layout. |
|
||||
| BANNER-14 | P1 | A/B edits within same publication window. | Region-specific final banner sets; B unaffected by A deactivate. |
|
||||
|
||||
Related: [uploads](uploads-images.md), [cache](cache-publication.md).
|
||||
26
docs/test-cases/bounds.md
Normal file
26
docs/test-cases/bounds.md
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# Delivery bounds and polygons
|
||||
|
||||
Scope: region bound CRUD, geographic resolution, active-bound selection and bound-specific settings. Fixtures A1/A2, B1, overlaps and border coordinates.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| BOUND-01 | P0 | Create valid Polygon bound with unique priority. | Stored under correct region; interior resolves correctly. |
|
||||
| BOUND-02 | P1 | Valid MultiPolygon/multiple supported features. | Every supported component resolves; unrelated exterior does not. |
|
||||
| BOUND-03 | P1 | Edit name/priority/polygon, reload map/list. | Exact geometry/priority retained and published. |
|
||||
| BOUND-04 | P1 | Malformed GeoJSON, empty features, unclosed/invalid coordinates. | Clear rejection; no half-saved geometry. |
|
||||
| BOUND-05 | P1 | Longitude/latitude swapped, out-of-range/nonfinite values. | Invalid geographic input rejected; no accidental huge service area. |
|
||||
| BOUND-06 | P1 | Priority 1/2/10, duplicate priority, invalid negative/fractional value. | Numeric ordering and approved uniqueness/value constraints. |
|
||||
| BOUND-07 | P0 | Point in two same-region bounds. | Deterministic agreed lowest-priority resolution. |
|
||||
| BOUND-08 | P1 | Exact edge/vertex, just inside/outside, polygon hole. | Agreed boundary semantics stable across API/map. |
|
||||
| BOUND-09 | P1 | Cross-region overlap. | Agreed tie rule; mark BLOCKED: POLICY until documented. |
|
||||
| BOUND-10 | P0 | Delete sole bound. | Refused; region always retains serviceable bound. |
|
||||
| BOUND-11 | P0 | Delete bound referenced by address; delete unreferenced extra bound. | Referenced deletion refused; allowed delete persists safely. |
|
||||
| BOUND-12 | P0 | Admin A reads/updates B1 settings/geometry by ID. | No foreign read/write; superadmin authorized path succeeds. |
|
||||
| BOUND-13 | P1 | U1 addresses in A1/A2/B1, change A priorities. | Active A bound comes from eligible A addresses, then effective fallback. |
|
||||
| BOUND-14 | P1 | Remove/replace polygon while checkout already open. | Address serviceability policy enforced; no stale bound fee misuse. |
|
||||
| BOUND-15 | P1 | Concurrent delete/address attachment or priority edits. | Referential integrity and deterministic active selection preserved. |
|
||||
| BOUND-16 | P1 | Bound constants removed/null; legacy address with no bound. | Defined fallback; never foreign region's bound. |
|
||||
| BOUND-17 | P2 | Pan/zoom/draw/cancel form/resize map. | Geometry only saved on confirmation; usable controls. |
|
||||
| BOUND-18 | P1 | Geo resolver timeout/no match. | Explicit no-service/retry response; no arbitrary region. |
|
||||
|
||||
Do not use region deletion as cleanup. See [addresses](addresses.md) and [constants](constants-configuration.md).
|
||||
30
docs/test-cases/cache-publication.md
Normal file
30
docs/test-cases/cache-publication.md
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# Regional cache generation and publication
|
||||
|
||||
Scope: products/stores/store-detail/banners caches, availability/slot caches, regional version rows, discovery KV, debounced generation and client persisted caches. Record DB value, served version and elapsed time.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| CACHE-01 | P0 | Fresh A customer discovery/cache load. | Correct bound request, `products_version_num`/availability/slot fields and region paths; no v-undefined. |
|
||||
| CACHE-02 | P0 | Structural product/store/tag change in A. | A catalog files advance/publish; B regional records unchanged. |
|
||||
| CACHE-03 | P0 | Price/stock/offer/suspension edit in A. | Correct A availability version and data; no stale orderable invalid SKU. |
|
||||
| CACHE-04 | P0 | Slot full/inactive/time/membership change. | Slot/next-delivery/cart choices converge within deadline. |
|
||||
| CACHE-05 | P1 | Global structural change and regional market overrides. | All intended region catalogs refresh; market-specific values preserved. |
|
||||
| CACHE-06 | P1 | Rapid A/B edits in debounce window. | Both pending regions published; final write not lost. |
|
||||
| CACHE-07 | P1 | Several same-region writes while generation running. | Later write triggers/retains needed publication; no stale final snapshot. |
|
||||
| CACHE-08 | P1 | Missing version row/new region. | Version seeded/incremented deterministically; one row per key/region. |
|
||||
| CACHE-09 | P1 | Missing/corrupt discovery KV in approved fixture. | Rebuilt for correct bound; no foreign fallback. |
|
||||
| CACHE-10 | P0 | Product file ready, availability old/missing/new or wrong region. | No unsafe zero price/in-stock or mixed-region purchasable catalog. |
|
||||
| CACHE-11 | P1 | Storage/object-write fails during generation. | Failed version not falsely claimed complete; repair/retry coherent. |
|
||||
| CACHE-12 | P1 | Purge/provider error or slow publication. | Explicit failure/deadline evidence; eventual repair, no eternal UI loading. |
|
||||
| CACHE-13 | P1 | Fresh vs already-open client after update. | Both converge; no restart/storage-clear prerequisite. |
|
||||
| CACHE-14 | P1 | Persisted client cache corrupt/outdated schema. | Safe discard/refetch; cart identities retained where valid. |
|
||||
| CACHE-15 | P0 | Rapid region switch with in-flight A requests after selecting B. | Old response cannot overwrite B store/state. |
|
||||
| CACHE-16 | P1 | App/browser restart offline with persisted data. | Supported cached browse, explicit stale/offline purchase restriction. |
|
||||
| CACHE-17 | P1 | Product deleted while related cache generation pending. | All live surfaces eventually omit it; history remains independent. |
|
||||
| CACHE-18 | P1 | Store detail and aggregate catalog fetched at same version. | Consistent membership/assets; no unrelated store content. |
|
||||
| CACHE-19 | P1 | Concurrent version increments in A. | Unique monotonic final version and corresponding served data. |
|
||||
| CACHE-20 | P2 | Client cache/poll interval, repeated refetch under slow network. | No uncontrolled request storm; bounded retries and accurate status. |
|
||||
| CACHE-21 | P0 | Public JSON/private data inspection. | No user/staff credentials, address/order/complaint leakage in static catalog. |
|
||||
| CACHE-22 | P1 | Deleted/deactivated region metadata or bound priority change. | Correct discovery rebuild and bound-scoped cache key; no stale fee. |
|
||||
|
||||
Paths must match backend builders, including catalog's API-cache-key prefix and availability/slots paths. Deadline breaches are failures with version evidence, not assumptions based on a UI screenshot.
|
||||
26
docs/test-cases/cancellation.md
Normal file
26
docs/test-cases/cancellation.md
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# Order cancellation and group-aware coupon restoration
|
||||
|
||||
Scope: customer/admin cancellation, reason/actor/status, group usages, refund eligibility and upcoming/vendor views.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| CANCEL-01 | P0 | Customer cancels pending COD order with valid reason. | Cancelled status/reason/actor stored; not fulfillable/upcoming; no cash refund owed. |
|
||||
| CANCEL-02 | P0 | Authorized admin cancels pending order. | Admin actor distinguishable; customer/admin see same state. |
|
||||
| CANCEL-03 | P1 | Blank/space/long/Unicode reason. | Agreed required reason/limits; clear validation. |
|
||||
| CANCEL-04 | P0 | Cancel delivered/already-cancelled/missing order. | Legal-state checks; no duplicate refund/compensation or resurrection. |
|
||||
| CANCEL-05 | P0 | U2 cancels U1; B admin cancels A. | Denied; owner order/usage untouched. |
|
||||
| CANCEL-06 | P0 | Cancel primary of split group only. | Other sibling intact; coupon usage still consumed while any effective sibling remains. |
|
||||
| CANCEL-07 | P0 | Cancel nonprimary only, then all remaining siblings. | Usage removed only on complete group cancellation. |
|
||||
| CANCEL-08 | P0 | Multiple coupons on fully cancelled group. | Every group's usage restored once, not just first coupon. |
|
||||
| CANCEL-09 | P1 | Cancel single non-group/legacy order. | Defined legacy restoration; no unrelated group's usages removed. |
|
||||
| CANCEL-10 | P0 | First effective order partially/fully cancelled. | First-order coupon eligibility based on effective groups consistently. |
|
||||
| CANCEL-11 | P1 | Cancellation racing with second sibling cancellation. | Correct final group restoration; no duplicate compensation/refund. |
|
||||
| CANCEL-12 | P0 | Cancellation races packaging/delivery. | Coherent legal transition, no final contradictory statuses. |
|
||||
| CANCEL-13 | P1 | Cancel after price/coupon/config edits. | Monetary compensation/refund based on stored charge, not current catalog. |
|
||||
| CANCEL-14 | P1 | Cancelled order in admin filters, vendor totals and next-order glimpse. | Correct exclusion/inclusion by filter, no production demand for cancelled item. |
|
||||
| CANCEL-15 | P1 | Cancellation transaction fails midway. | No half-cancelled status/usage/refund state; safe retry. |
|
||||
| CANCEL-16 | P1 | Notification/Telegram fails after cancellation saved. | State persisted and recoverable; no duplicate cancel from retry. |
|
||||
| CANCEL-17 | P1 | Cart after cancellation. | No unexpected automatic cart restoration/duplicate item unless explicit policy. |
|
||||
| CANCEL-18 | P2 | Cancel confirmation/back/error dialog. | Cancel-dialog dismissal does not mutate; errors visible and loading clears. |
|
||||
|
||||
Paid cancellation/refund cases are conditional; see [payments/refunds](payments-refunds.md). Order-group IDs and usage row counts are required evidence.
|
||||
30
docs/test-cases/cart.md
Normal file
30
docs/test-cases/cart.md
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# Regular and flash carts
|
||||
|
||||
Scope: local cart storage, query hooks, quantity/slot reconciliation, floating/expanded/full cart, notes and region switching. Fixtures: P/Q/G and independent regular/flash carts.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| CART-01 | P0 | Add from Home/search/store/detail; inspect all cart surfaces. | Same SKU IDs, quantities, line counts, prices and subtotal. |
|
||||
| CART-02 | P1 | Add same SKU again vs explicit Update Item. | Add merges as intended; update sets quantity, not adds again. |
|
||||
| CART-03 | P1 | Increase/decrease with product increment step. | Same allowed quantity rule in every entry point. |
|
||||
| CART-04 | P1 | Zero/remove confirmation cancel then confirm. | Cancel retains line; confirm removes only selected SKU. |
|
||||
| CART-05 | P0 | Populated cart, cold-start before catalog/availability loads. | Cart restored when stores ready; not silently deleted or permanently empty. |
|
||||
| CART-06 | P1 | Regular/flash populated; edit/remove one. | Separate storage/state; no unintended other-cart changes. |
|
||||
| CART-07 | P1 | Assign/change slots; leave/reenter/relaunch. | Selection persistence matches policy; no quantity duplication. |
|
||||
| CART-08 | P0 | One line becomes OOS/suspended/deleted; all lines invalid. | Clearly excluded from pricing/submit; all-invalid checkout blocked. |
|
||||
| CART-09 | P1 | Notes entered, navigate checkout/back, edit again. | Latest notes survive and are submitted; readonly checkout agrees. |
|
||||
| CART-10 | P1 | Apply/remove several coupons, quantity changes. | Eligibility/discount recomputed; no stale invalid selected discount. |
|
||||
| CART-11 | P0 | Confirm A→B switch; cancel switch. | Confirm clears regional state/both carts; cancel preserves everything. |
|
||||
| CART-12 | P1 | Two rapid adds/different SKU writes and concurrent controls. | No lost storage update or duplicate local ID/negative quantity. |
|
||||
| CART-13 | P1 | Corrupt JSON/storage unavailable/full. | Recoverable state; never order corrupted/unknown quantity. |
|
||||
| CART-14 | P1 | Catalog ID missing after product deletion or region switch. | Useful missing-line state; no zero-priced purchasable phantom. |
|
||||
| CART-15 | P1 | Slow price refresh while cart visible. | Coherent quote/loading; no mixture of previous region's prices. |
|
||||
| CART-16 | P1 | Large quantities/fractional increments direct local/API input. | Contract enforced; integer order quantities not silently rounded. |
|
||||
| CART-17 | P1 | Logout/login U2 with U1 cart. | Agreed cart-retention policy; no U1 address/coupon/notes ownership leakage. |
|
||||
| CART-18 | P1 | Checkout only selected available subset, then success. | Ordered lines cleared per agreed policy; unrelated invalid/unselected lines not silently lost. |
|
||||
| CART-19 | P2 | Floating bar expand/collapse, navigation, safe-area/keyboard. | Counts accurate; cart usable across platforms. |
|
||||
| CART-20 | P1 | Back from checkout with malformed/stale slot/coupon params. | Existing cart unchanged; explicit reconciliation instead of wrong item ordered. |
|
||||
| CART-21 | P0 | Network unavailable; attempt submit from cached cart. | No false order success; recoverable offline state. |
|
||||
| CART-22 | P1 | Same global SKU across A/B switch. | Old A quote/slot does not survive because structural ID is shared. |
|
||||
|
||||
Policy checkpoints: local cart behavior on account switch, slot persistence, fractional increment support, and retention of invalid lines after partial checkout.
|
||||
26
docs/test-cases/catalog-search.md
Normal file
26
docs/test-cases/catalog-search.md
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# Customer catalog, search and product detail
|
||||
|
||||
Scope: Home, Stores, Search, Offers, Combos, slot view, product/variant details and Add to Cart entry points on native/web.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| CAT-01 | P0 | Fresh signed-out/signed-in A session. | Discovery/caches load; catalog browse independent of authentication. |
|
||||
| CAT-02 | P0 | Browse A→B→A with distinct regional and global SKUs. | Regional content isolated; global SKU uses selected market values. |
|
||||
| CAT-03 | P1 | Search exact/partial product and variant names. | Relevant correct SKU results; variant selection preserved into detail/cart. |
|
||||
| CAT-04 | P1 | Search blank/whitespace, case, Unicode, punctuation, no-match. | Safe input handling; appropriate full/empty/no-results behavior. |
|
||||
| CAT-05 | P0 | Search foreign-region name or deep-link foreign ID. | No purchasable foreign item/price leakage. |
|
||||
| CAT-06 | P1 | Offers flag changed while screen open. | Appropriate membership/price refresh; no duplicate cards. |
|
||||
| CAT-07 | P1 | Combo-only/deleted/suspended SKU across every list surface. | Visibility/purchasability policy consistent, including store and search. |
|
||||
| CAT-08 | P1 | Multi-SKU product detail; select each variant and quantity. | Features/images/unit notation/price and added SKU identity match selection. |
|
||||
| CAT-09 | P1 | Missing MRP/image/description/slot; zero data sets. | Intentional fallback; no NaN savings/broken image or false availability. |
|
||||
| CAT-10 | P0 | Products loads before availability or availability fails. | No orderable false zero price/false in-stock state; recoverable loading. |
|
||||
| CAT-11 | P1 | Rapid search and region change with delayed result. | Late response cannot restore foreign/outdated products. |
|
||||
| CAT-12 | P1 | Store/tag/slot product-list transitions and Add entry points. | Same SKU, availability and cart merge behavior everywhere. |
|
||||
| CAT-13 | P1 | Price or feature edit while detail is open. | Latest coherent content after refresh; historical price not confused with live quote. |
|
||||
| CAT-14 | P1 | Long list, repeated fetch, pull-to-refresh, pagination if present. | No duplicates, omissions or manual refresh needed after startup. |
|
||||
| CAT-15 | P2 | Missing/deleted product direct URL, browser back/reload. | Recoverable not-found; no navigation loop. |
|
||||
| CAT-16 | P2 | Screen reader, text scale, low bandwidth images. | Named controls, stable layout and visible loading/error fallback. |
|
||||
| CAT-17 | P1 | Available product loses all valid slots. | Regular purchasing blocked/alternative offered; flash policy independent. |
|
||||
| CAT-18 | P1 | Very large/case-normalized filters and numeric-looking names. | Filter selection uses IDs; no name-to-ID collision. |
|
||||
|
||||
Related: [cache](cache-publication.md), [tags](product-tags-ordering.md), [cart](cart.md).
|
||||
28
docs/test-cases/checkout.md
Normal file
28
docs/test-cases/checkout.md
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# Checkout summary and submission
|
||||
|
||||
Scope: regular/flash checkout, route params, selected address/slots/coupons/notes and Place Order guard. Financial detail in [pricing](pricing-delivery-fees.md).
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| CHECK-01 | P0 | Valid Cart→Checkout→COD success. | Correct items/slots/address/coupons/instructions, matching authoritative payable. |
|
||||
| CHECK-02 | P1 | Items assigned to S1/S2, inspect grouped summary. | Correct group quantities/dates, chronologically ordered. |
|
||||
| CHECK-03 | P1 | Back to Cart, edit every selection, return. | Latest state shown/submitted; no obsolete cached route selection. |
|
||||
| CHECK-04 | P1 | Checkout readonly items/address/notes. | Cart is intentional edit path; back navigation usable. |
|
||||
| CHECK-05 | P0 | Missing address/region/all-valid items. | Submission blocked with useful action; no empty group. |
|
||||
| CHECK-06 | P1 | Empty cart vs items with no assigned slots. | Distinct meaningful empty states; hook order stable on async load. |
|
||||
| CHECK-07 | P0 | Malformed slot/coupon param, duplicate/nonfinite IDs, missing colon/groups. | Safe validation/reconciliation; cannot order unintended SKU/slot. |
|
||||
| CHECK-08 | P0 | Stale price/stock/freeze/capacity/address/coupon before submit. | Server revalidation; documented reprice/recovery, no false success. |
|
||||
| CHECK-09 | P0 | Rapid Place Order tap plus pending rerender. | Synchronous guard sends one in-app request. |
|
||||
| CHECK-10 | P1 | Mutation fails then user retries. | Loading guard released; error displayed; cart/notes remain. |
|
||||
| CHECK-11 | P0 | Response lost after order commit. | Inspect authoritative orders before retry; flag known lack of server idempotency. |
|
||||
| CHECK-12 | P1 | Navigate away/background app during request. | No crash/wrong success route or duplicate submit on resume. |
|
||||
| CHECK-13 | P1 | Multiple suborders server response. | Success references valid created order/group and sums server totals. |
|
||||
| CHECK-14 | P1 | Fully discounted goods and free fee give server total zero. | Success shows authoritative zero, not stale fallback preview. |
|
||||
| CHECK-15 | P0 | UI selected coupons are now ineligible but IDs remain selected. | No silently misleading discounted preview; invalid selection removed or actionable rejection. |
|
||||
| CHECK-16 | P1 | Customer signs out/session expires mid-checkout. | Protected mutation denied; safe login return preserves allowed state. |
|
||||
| CHECK-17 | P0 | Client bound differs from address bound. | Server ignores malicious/mistaken override where address bound exists. |
|
||||
| CHECK-18 | P1 | One cart item invalid, several valid; flash eligibility changed. | Summary and submitted item subset/charge agree. |
|
||||
| CHECK-19 | P2 | Android back/iOS swipe/browser refresh/deep link. | No stale cart, lost instruction or login-return loop. |
|
||||
| CHECK-20 | P1 | Online option in current build. | Clearly disabled until gateway feature enabled; COD invokes no gateway. |
|
||||
|
||||
Known policy: server order-idempotency is deferred; concurrent raw API submissions are characterization/risk cases, not an assumed deduplicated happy path.
|
||||
24
docs/test-cases/combos.md
Normal file
24
docs/test-cases/combos.md
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# Combo products and combo-only components
|
||||
|
||||
Scope: item/combo product type, component membership, feature display, visibility and purchasing.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| COMBO-01 | P0 | Create valid combo with two components; assign slot; order. | One combo SKU line charged at combo price; no duplicate component charges. |
|
||||
| COMBO-02 | P1 | Edit component set/features/image. | Latest composition displayed; unrelated combos unaffected. |
|
||||
| COMBO-03 | P1 | Component marked combo-only. | Hidden from Home/search/Offers/store lists but visible within combo details. |
|
||||
| COMBO-04 | P1 | Ordinary component used by multiple combos. | Correct membership; edits don't duplicate or detach other combos. |
|
||||
| COMBO-05 | P1 | Duplicate components in create/update. | Deduplicated/rejected per contract; no duplicate feature/quantity rendering. |
|
||||
| COMBO-06 | P0 | Foreign-region/missing/deleted component ID. | Invalid associations rejected before partial combo creation. |
|
||||
| COMBO-07 | P0 | Self-reference or cyclic nested combos. | Rejected or bounded supported graph; no recursive crash or infinite calculation. |
|
||||
| COMBO-08 | P1 | Empty component list and item→combo/type reversal. | Approved product-type rules; no orphan old membership. |
|
||||
| COMBO-09 | P0 | Component globally/regionally suspended/OOS/deleted. | Agreed combo serviceability policy consistent in catalog and server checkout. |
|
||||
| COMBO-10 | P1 | Attempt suspend component of active combo. | Approved dependency protection with clear blocker; no partial suspension. |
|
||||
| COMBO-11 | P1 | Component regular-only but combo flash-enabled. | Explicit flash/component policy; no inconsistent silently substituted price. |
|
||||
| COMBO-12 | P0 | Coupon targets combo SKU vs component SKU only. | Target matching uses actual purchased line SKU; no phantom component discount. |
|
||||
| COMBO-13 | P1 | Global combo shown in A/B with regional prices. | Structural composition stable; market flags/price scoped. |
|
||||
| COMBO-14 | P1 | Component product rename/delete after historical combo order. | Historical purchased identity/amount unchanged; no detail crash. |
|
||||
| COMBO-15 | P1 | Long/missing features and missing component image. | Useful fallback, no blank broken combo summary. |
|
||||
| COMBO-16 | P1 | Save fails during component writes, retry. | No partial/duplicate memberships; old combo retained on failed edit. |
|
||||
|
||||
Policy checkpoints: component OOS/deletion behavior, nested combos, and direct API orders of combo-only SKUs. Prior policy allows direct API access to combo-only SKUs; hidden customer-list visibility is mandatory, but do not invent a server prohibition.
|
||||
24
docs/test-cases/complaints.md
Normal file
24
docs/test-cases/complaints.md
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# Customer complaints and resolution
|
||||
|
||||
Scope: customer complaint list/raise, admin regional list/resolve, attachments and customer response visibility. Fixtures U1/U2 with A/B orders and general complaints.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| SUPPORT-01 | P1 | U1 raises complaint on own A order with valid photo. | Correct order/customer/text/attachment; A admin sees it. |
|
||||
| SUPPORT-02 | P1 | Raise general complaint without order. | Supported category stored/listed; no invented order association. |
|
||||
| SUPPORT-03 | P1 | A admin resolves with valid response. | Resolution state/body persists; customer sees response; supported notification enqueued. |
|
||||
| SUPPORT-04 | P1 | Empty/missing/long/Unicode complaint or response. | Approved validation; safe plain-text rendering. |
|
||||
| SUPPORT-05 | P0 | U2 files against/reads U1 order/complaint by ID. | Ownership enforced; no private order attachment. |
|
||||
| SUPPORT-06 | P0 | Admin B reads/resolves A complaint. | Regional access enforced; no leak/update. |
|
||||
| SUPPORT-07 | P1 | Missing/deleted order/product reference, old cancelled order. | Approved eligibility/history behavior; no detail crash. |
|
||||
| SUPPORT-08 | P1 | Invalid/unclaimed/missing attachment image. | Rejection or intentional no-image behavior; no half-created complaint. |
|
||||
| SUPPORT-09 | P0 | Reuse another account's uploaded image key. | Asset ownership validated; no foreign attachment exposure. |
|
||||
| SUPPORT-10 | P1 | Repeat resolve/concurrent responses. | Defined final response/event count; no duplicate compensation or push. |
|
||||
| SUPPORT-11 | P1 | Many open/resolved complaints, filter/page/reload. | Accurate totals/scope; no duplicate/missing rows. |
|
||||
| SUPPORT-12 | P1 | Complaint submitted while region switched. | Region derived by approved order/general-complaint rule, not accidental stale client. |
|
||||
| SUPPORT-13 | P1 | Resolve succeeds but queue/push fails. | Persisted resolution remains; recoverable notification, no false rollback claim. |
|
||||
| SUPPORT-14 | P1 | Network loss during create/resolve, retry after checking state. | No hidden partial complaint or duplicate response. |
|
||||
| SUPPORT-15 | P2 | Photos slow/broken, multiline response/text scale. | Useful attachment/error fallback and readable content. |
|
||||
| SUPPORT-16 | P0 | Anonymous/customer attempts admin resolve. | Server denies; complaint unchanged. |
|
||||
|
||||
Policy checkpoint: regional ownership of general complaints without an order, repeat-resolution rules and compensation integration.
|
||||
26
docs/test-cases/constants-configuration.md
Normal file
26
docs/test-cases/constants-configuration.md
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# Global, regional and bound constants
|
||||
|
||||
Scope: common discovery, superadmin constants/region/bound settings, regional admin customization. Authoritative discovery currently requires `boundId`.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| CFG-01 | P0 | Fresh web/native discovery with valid A1 bound. | Sends correct `{ boundId }`; flat config/assets/version fields load. |
|
||||
| CFG-02 | P0 | Change A1 fee/threshold then select A2 address. | Quote uses selected address's bound; no borrowed A1 fee. |
|
||||
| CFG-03 | P1 | Change A support/welcome/flash setting; browse A/B. | Region-wide A propagation; B unchanged. |
|
||||
| CFG-04 | P1 | Superadmin changes app version/store URLs. | Global fields propagate to all appropriate clients. |
|
||||
| CFG-05 | P0 | Admin attempts global/legacy-global mutation. | Denied; no bypass through deprecated endpoint. |
|
||||
| CFG-06 | P0 | Write bound key through region endpoint, region key through bound endpoint. | Scope validation rejects; no stray row in wrong table. |
|
||||
| CFG-07 | P1 | Boolean true/false strings, numeric zero, null, empty and invalid values. | Agreed typed parsing/fallback; no NaN/undefined or truthy 'false'. |
|
||||
| CFG-08 | P1 | Negative fee/threshold, absurd values and unexpected key. | Domain/schema constraints applied; no invalid published quote. |
|
||||
| CFG-09 | P0 | Admin A passes B1 bound ID. | Forbidden; B1 constants untouched. |
|
||||
| CFG-10 | P1 | Missing bound/key, invalid ID or empty update. | Clear response/fallback; no arbitrary default region. |
|
||||
| CFG-11 | P1 | Bulk edit has one invalid key. | Approved atomicity; rejected batch does not partially apply valid keys. |
|
||||
| CFG-12 | P1 | Rapid edits in A and B within cache debounce. | Both final values publish; region job not overwritten. |
|
||||
| CFG-13 | P1 | Cold/open clients after config update. | DB, KV and client converge within deadline and correct query key. |
|
||||
| CFG-14 | P1 | Remove/corrupt bound KV entry in sanctioned staging. | Rebuild/fallback coherent; no other bound's config reused. |
|
||||
| CFG-15 | P1 | Active-bound priority changes while client open. | Discovery refetches appropriate bound; quote refreshed. |
|
||||
| CFG-16 | P0 | Checkout sends mismatched client bound when address has a bound. | Address bound remains authoritative on server. |
|
||||
| CFG-17 | P1 | Regional ordering key contains deleted/duplicate/foreign SKU IDs. | Agreed validation/filtering; safe customer list, no regional leak. |
|
||||
| CFG-18 | P2 | Older app/update notice, closeability, missing store URL. | Correct update-policy display and recoverable navigation. |
|
||||
|
||||
Known regression: [review R1](../multi-region-i2-review.md). General minimum-order controls must not impose a minimum under current policy.
|
||||
36
docs/test-cases/coupon-application.md
Normal file
36
docs/test-cases/coupon-application.md
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
# Coupon eligibility, targeting and multi-coupon stacking
|
||||
|
||||
Scope: getEligible/getMyCoupons, cart selection, checkout `couponIds`, shared pricing, validation and coupon usage. New regional/product-targeting policy supersedes the older sanity-plan global-only assumptions.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| CPA-01 | P0 | Apply valid whole-cart percentage coupon, place COD order. | Goods-only discount/cap; preview=persisted detail; one usage. |
|
||||
| CPA-02 | P0 | Apply flat coupon, remove it, reapply. | Exact discount restoration; fee/threshold recomputed; no usage until placement. |
|
||||
| CPA-03 | P0 | Browse A/B with A-regional/B-regional/global coupons. | List and server spend enforce region; globals allowed in both. |
|
||||
| CPA-04 | P0 | U1-only coupon listed/applied by U2, including direct guessed ID. | U2 denied; no usage/order created. |
|
||||
| CPA-05 | P1 | Target P only in mixed P/Q cart. | Discount only P; Q subtotal unaffected. |
|
||||
| CPA-06 | P0 | Target P but cart contains only Q; empty target list. | Targeted no-match rejected; untargeted applies to eligible whole cart. |
|
||||
| CPA-07 | P0 | Min ₹200 targeted goods: P ₹50 + unrelated ₹300. | UI disables; server rejects, no consumed usage. Regression R7. |
|
||||
| CPA-08 | P1 | Targeted min−0.01/min/min+0.01; change qty/flash price/stock. | Eligibility based on actual available target subtotal and recomputed. |
|
||||
| CPA-09 | P0 | Stack percentage and flat coupons in reverse input order. | Defined percentage-first computation; stable per-type ordering/caps. |
|
||||
| CPA-10 | P0 | Exclusive coupon alone, exclusive plus one/another exclusive. | Alone works; all combinations with another coupon rejected. |
|
||||
| CPA-11 | P1 | Select exclusive after nonexclusive and vice versa. | Clear selection/replacement behavior; UI cannot knowingly submit invalid combination. |
|
||||
| CPA-12 | P1 | Duplicate coupon IDs, empty array, many eligible coupons. | Dedupe usages; no imposed coupon-count cap; empty works. |
|
||||
| CPA-13 | P0 | Missing/negative/fractional/nonfinite IDs, unknown coupon and legacy `couponId`. | Invalid contract safely rejected/no silently discounted legacy input; hard-switch behavior explicit. |
|
||||
| CPA-14 | P0 | Overlapping targets across ₹100/₹900 split slots. | No negative sub-order or discount offset against unrelated goods. Regression R3. |
|
||||
| CPA-15 | P0 | Combined individual discounts exceed goods. | Shared aggregate cap on both UI/server; nonnegative quote. Regression R4. |
|
||||
| CPA-16 | P0 | OOS/suspended lines, flash-priced items and combo SKU targets. | Unavailable lines excluded; actual flash/combo purchased SKU values used. |
|
||||
| CPA-17 | P0 | Invalidated/expired/missing coupon after checkout opened. | Server rejects stale coupon; no order/usage writes. |
|
||||
| CPA-18 | P0 | Per-user limit exactly reached; another user below limit. | Correct per-user count, no global-count confusion. |
|
||||
| CPA-19 | P0 | Concurrent orders with one remaining permitted use. | Approved atomic limit guarantee; no overuse. |
|
||||
| CPA-20 | P0 | First-order U0, one split group, subsequent order. | Split group counts as one effective order; first-order coupon no longer eligible. |
|
||||
| CPA-21 | P1 | Cancel only one sibling vs every sibling, then first-order/usage retry. | Group-aware restored eligibility follows effective-order policy. |
|
||||
| CPA-22 | P1 | Coupon edited after placement; reopen customer/admin history. | Stored discount read, not recomputed from new percent/cap/targets. |
|
||||
| CPA-23 | P0 | Split placement with several coupons. | One usage per coupon on same deterministic primary sub-order. |
|
||||
| CPA-24 | P1 | Expiry exact boundary/client clock skew. | Server deadline authoritative; UI stale state recoverable. |
|
||||
| CPA-25 | P1 | Coupon list request with missing/foreign/invalid region. | Explicit safe contract; customer does not accidentally see/apply foreign promotion. |
|
||||
| CPA-26 | P1 | Coupon query fails, relogin U2, region changes. | No stale U1/other-region selected coupon leakage. |
|
||||
| CPA-27 | P1 | Small target contribution rounds below minor unit. | Agreed currency rounding/usage behavior; per-order sum reconciles. |
|
||||
| CPA-28 | P1 | Quantity reduction makes selected coupon ineligible before submit. | UI flags/removes invalid discount and submits coherent IDs. |
|
||||
|
||||
Policies: percentage original-vs-remaining basis and zero-cap/zero-limit semantics need explicit approval. Caps, targeting, exclusive-only behavior and client/server parity are mandatory.
|
||||
28
docs/test-cases/coupon-management.md
Normal file
28
docs/test-cases/coupon-management.md
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# Coupon administration and global authoring
|
||||
|
||||
Scope: regional admin coupon CRUD/user targeting/product targeting, superadmin global coupon CRUD and form serialization. Regional coupons have region ID; global coupons have null region and are authored only by superadmin.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| CPM-01 | P0 | Admin A creates general percentage coupon. | A-scoped coupon with exact code/limits/cap; A eligible path works. |
|
||||
| CPM-02 | P1 | Create flat coupon and edit all supported fields. | Correct persisted discount type/expiry/min/limit/exclusive values. |
|
||||
| CPM-03 | P0 | Superadmin creates global coupon. | Null region; usable across regions subject to user/product rules. |
|
||||
| CPM-04 | P0 | Regional admin attempts null-region/global creation or edit. | Cannot author/change global coupon through any endpoint. |
|
||||
| CPM-05 | P1 | Auto-generated code vs multiple explicit codes. | Intended unique count; deterministic code normalization and collisions. |
|
||||
| CPM-06 | P1 | Both/neither discount type, negative values, percentage >100. | Business/schema constraints; no negative unintended promotion. |
|
||||
| CPM-07 | P1 | Empty/space/case-variant/duplicate code. | Approved normalization and uniqueness; no accidental empty code. |
|
||||
| CPM-08 | P0 | User-only coupon for U1 vs all-users flag. | Eligibility/applicability reflects exact intended scope. |
|
||||
| CPM-09 | P1 | Missing/nonexistent/duplicate user IDs. | Validation/deduplication; no orphan applicable-user rows. |
|
||||
| CPM-10 | P0 | Target A SKU and global SKU; try B regional SKU in A coupon. | Valid targets allowed; foreign regional target denied. |
|
||||
| CPM-11 | P1 | Empty targets vs relation targets vs legacy `skuIds`. | Defined canonical semantics; no drift that expands target scope unexpectedly. |
|
||||
| CPM-12 | P1 | Replace/remove all product/user targets on edit. | Old relations removed as intended; empty target means whole cart. |
|
||||
| CPM-13 | P1 | Null/zero maxValue/minOrder/max-user-limit. | Defined unlimited/zero behavior; omission differs from explicit clearing. |
|
||||
| CPM-14 | P1 | Expiry past/now/future, invalid date/timezone boundary. | Valid serialization and eligibility deadline. |
|
||||
| CPM-15 | P0 | B admin reads/edits/invalidates A coupon ID. | Foreign access denied; coupon unchanged. |
|
||||
| CPM-16 | P1 | Invalidate used coupon then inspect old order. | New spend blocked; persisted historical discount unchanged. |
|
||||
| CPM-17 | P1 | Multi-code batch has later duplicate/invalid code. | Agreed atomic batch behavior; any committed subset explicitly reported, not hidden partial failure. |
|
||||
| CPM-18 | P1 | Concurrent duplicate creation/save failure mid-relations. | One coherent coupon; no duplicate/orphan target relations. |
|
||||
| CPM-19 | P1 | Global coupon creator has no staff-user row. | Supported author metadata persists without FK error; audit policy explicit. |
|
||||
| CPM-20 | P2 | Product/user picker with same names, global badges and edit hydration. | Correct IDs retained; hidden target selection not lost on unrelated save. |
|
||||
|
||||
Policy checkpoint: global coupons targeting regional-only products and audit attribution for superadmin creation. Do not assume an unimplemented global-coupon UI exists: API cases remain applicable.
|
||||
37
docs/test-cases/customer-authentication.md
Normal file
37
docs/test-cases/customer-authentication.md
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# Customer authentication
|
||||
|
||||
Scope: `user.auth`, login/registration screens, login walls and auth context on native/web. Password journeys are active; do not trigger real OTP/SMS tests without separate approval. Fixtures: U0/U1/U2 and disposable accounts; see [shared rules](README.md).
|
||||
|
||||
## Happy paths
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| AUTH-01 | P0 | Password-login with each supported mobile/email identifier. | Correct account/session; no OTP sent; private APIs become available. |
|
||||
| AUTH-02 | P0 | Register valid disposable user, sign out, sign in. | Exactly one complete account; supported credentials work. |
|
||||
| AUTH-03 | P1 | Login from Cart, Me and protected checkout links. | Returns to correct allowed destination; cart/query context retained. |
|
||||
| AUTH-04 | P1 | Browse catalog/search signed out; open Cart and Me. | Public browsing works; login walls do not block other tabs. |
|
||||
| AUTH-05 | P1 | Cold-start with valid persisted session, then logout. | Session restored; logout removes private state and access. |
|
||||
|
||||
## Validation and boundaries
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| AUTH-06 | P0 | Wrong password, unknown user, empty/malformed identifier. | Safe authentication failure; no token/session or private data. |
|
||||
| AUTH-07 | P1 | Missing fields, unacceptable password, invalid mobile/email, unchecked required terms. | Specific validation; no partial registration; correction succeeds. |
|
||||
| AUTH-08 | P1 | Duplicate email/mobile; case/space variations. | Agreed normalization/uniqueness; no duplicate identity. |
|
||||
| AUTH-09 | P1 | Unicode name, punctuation, long identifier/password, leading/trailing spaces. | Agreed limits applied consistently; no crash or silent truncation. |
|
||||
| AUTH-10 | P0 | Tampered, expired, malformed JWT and absent authorization. | Private requests rejected; UI recovers to authentication. |
|
||||
| AUTH-11 | P0 | Customer supplies staff/superadmin claims or token to wrong auth endpoint. | No role escalation or cross-identity session. |
|
||||
|
||||
## Lifecycle, security and recovery
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| AUTH-12 | P0 | Logout U1, login U2 without clearing storage. | No U1 addresses/orders/coupons/selected checkout state exposed to U2. |
|
||||
| AUTH-13 | P1 | Login request delayed, double tap, navigate away, background app. | No duplicate submit/session race or permanent spinner. |
|
||||
| AUTH-14 | P1 | Offline, timeout, 401/500 during login, then retry. | Accurate error; no false authenticated state; retry succeeds. |
|
||||
| AUTH-15 | P0 | Malicious external or privileged return URL. | Navigation stays within allowed customer destinations. |
|
||||
| AUTH-16 | P1 | Register two concurrent requests for same identifier. | One identity; rejected request leaves no orphan detail/credential row. |
|
||||
| AUTH-17 | P2 | Browser refresh/back and native keyboard/secure password entry. | Correct route, focus, masking and password accessibility. |
|
||||
| AUTH-18 | P2 | OTP endpoints in approved isolated harness only: invalid/expired/reused code. | If enabled, no bypass/replay; otherwise mark conditional, not a password-flow prerequisite. |
|
||||
|
||||
Apply the README result-recording rules to every table section; cases are NOT RUN.
|
||||
|
||||
Conditional SMS/verification coverage is expanded in [OTP authentication](otp-authentication.md); it is not part of the default password suite.
|
||||
24
docs/test-cases/customer-management-incidents.md
Normal file
24
docs/test-cases/customer-management-incidents.md
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# Customer administration, suspension and incidents
|
||||
|
||||
Scope: admin user lists/details/essentials, search, updateUserSuspension, user incidents/negativity and authorized operational customer views.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| CUSTOMER-01 | P1 | Admin lists/searches customer and opens detail. | Supported region association and correct customer identity/order statistics. |
|
||||
| CUSTOMER-02 | P1 | Exact/partial mobile/email/name, empty/no-match search. | Accurate safe results; no confusion between label and customer ID. |
|
||||
| CUSTOMER-03 | P0 | Suspend U1, then place order with existing customer token. | Server blocks; browsing/history behavior follows policy. |
|
||||
| CUSTOMER-04 | P0 | Unsuspend U1, retry valid checkout. | Allowed again; no permanent stale suspension. |
|
||||
| CUSTOMER-05 | P1 | Add incident with permitted score/note/order. | Correct user association; persisted score/note/date and authorized views agree. |
|
||||
| CUSTOMER-06 | P1 | Empty/long/Unicode incident, invalid score/order/user. | Validation, no partial incident or arbitrary user note. |
|
||||
| CUSTOMER-07 | P0 | Incident references another customer's/region's order. | Association and regional permissions enforced. |
|
||||
| CUSTOMER-08 | P0 | B admin probes private A customer details/addresses/incidents. | Approved customer-global vs regional-data policy enforced; no unintended private data. |
|
||||
| CUSTOMER-09 | P1 | Same customer has A/B orders/addresses. | Statistics/scope consistent; no one-region cursor truncation or duplicate account. |
|
||||
| CUSTOMER-10 | P1 | User profile edited/soft-deleted after incident/order. | Approved history/privacy retention; no operational crash. |
|
||||
| CUSTOMER-11 | P0 | Anonymous/customer sets suspension or incident score. | Denied; global identity cannot be abused by arbitrary caller. |
|
||||
| CUSTOMER-12 | P1 | Concurrent suspension/unsuspension and order submit. | Committed restrictions enforced; coherent final state. |
|
||||
| CUSTOMER-13 | P1 | Repeated incident submission/save response loss. | Inspect persisted state; no accidental duplicate penalty record. |
|
||||
| CUSTOMER-14 | P1 | Pagination/sorting across many regional customers/orders. | No duplicates, skipped associated customers or foreign-order statistics. |
|
||||
| CUSTOMER-15 | P1 | Incident does not automatically suspend customer. | No undocumented enforcement side effect; actual score/suspension distinct. |
|
||||
| CUSTOMER-16 | P2 | Search slow/error, large details/history, mobile number copy/link. | Useful retry and accurate actionable data, no endless spinner. |
|
||||
|
||||
Policy checkpoint: which user fields are globally visible to staff, region eligibility for suspension and score rules. Do not equate global customer identity with unrestricted private-data access.
|
||||
22
docs/test-cases/delivery-operations.md
Normal file
22
docs/test-cases/delivery-operations.md
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Delivery sequence and operational maps
|
||||
|
||||
Scope: slot deliverySequence, admin delivery order/map views and order coordinate overrides. Fixtures: A/B orders, addresses with/without coordinates, split siblings.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| DELIVERY-01 | P1 | Set/reorder A slot's delivery sequence. | Saved exact intended order; reload and operational list agree. |
|
||||
| DELIVERY-02 | P1 | Update order operational coordinates. | Correct order marker moves; customer identity/region/bound unchanged. |
|
||||
| DELIVERY-03 | P1 | Empty sequence, one order, many addresses. | Meaningful map/list and deterministic order. |
|
||||
| DELIVERY-04 | P0 | A sequence contains B order or wrong slot's order. | Unauthorized/incoherent association rejected. |
|
||||
| DELIVERY-05 | P1 | Duplicate/missing/cancelled order IDs. | Validated/reconciled; no duplicate stop or cancelled demand. |
|
||||
| DELIVERY-06 | P1 | New order arrives after sequence saved. | Defined insertion/unsequenced handling; no silently hidden delivery. |
|
||||
| DELIVERY-07 | P1 | Cancel/deliver order while delivery view open. | List/map/status refresh coherently; route doesn't resurrect stale stop. |
|
||||
| DELIVERY-08 | P0 | Invalid lat/lng/nonfinite/out-of-range coordinate. | Rejected; previous operational coordinates retained. |
|
||||
| DELIVERY-09 | P1 | Address lacks coordinates or multiple orders share address. | Useful warning/distinct order association; no arbitrary marker. |
|
||||
| DELIVERY-10 | P0 | Customer/anonymous/B admin alters A coordinates/sequence. | Forbidden; no order/address write. |
|
||||
| DELIVERY-11 | P1 | Coordinate override vs customer subsequently edits address. | Approved ownership/snapshot policy, no silent customer-bound mutation. |
|
||||
| DELIVERY-12 | P1 | Concurrent reorder/update and network failure. | Coherent saved sequence, recoverable UI; no lost unrelated stop. |
|
||||
| DELIVERY-13 | P2 | Map load failure, offline tiles, zoom/resize/back. | List remains usable; loading bounded, address data not exposed externally unnecessarily. |
|
||||
| DELIVERY-14 | P1 | Orders split across slots at same address. | Correct slot-specific stops/quantities; no group double-count confusion. |
|
||||
|
||||
Policy checkpoint: delivery sequence schema, unsequenced new-order placement, and operational versus customer address-coordinate ownership.
|
||||
22
docs/test-cases/fallback-legacy-pages.md
Normal file
22
docs/test-cases/fallback-legacy-pages.md
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Fallback and legacy standalone pages — conditional
|
||||
|
||||
Scope inventory: fallback login, user-home/user-details/order-details, location-marker, user-connect, create-coupon, vendor-order-list, super-admin, inauguration, home/demo. Presence of a route does not imply supported release functionality. Validate active ownership with product/operations; unsupported/demo pages are N/A with reason, not PASS.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| LEGACY-01 | P1 | Approved fallback login and direct allowed destination. | Correct session/role/context; no undocumented bypass of primary apps. |
|
||||
| LEGACY-02 | P0 | Anonymous/customer visits operational user/order/super-admin routes. | Private reads/mutations still require intended authority. |
|
||||
| LEGACY-03 | P0 | User/order detail with guessed foreign IDs. | Ownership/region denial; URL knowledge not authorization. |
|
||||
| LEGACY-04 | P1 | Supported location marker saves intended order/address coords. | Correct target only; region/bound not silently overwritten. |
|
||||
| LEGACY-05 | P1 | Missing/malformed marker params/coords and permission denied. | Recoverable validation; no arbitrary write or endless map. |
|
||||
| LEGACY-06 | P0 | Standalone coupon creation from staff A vs customer/B/global attempt. | Same current regional/global authoring restrictions as primary router. |
|
||||
| LEGACY-07 | P1 | User-connect flow with approved identity/link. | No cross-account join/impersonation; link policy explicit. |
|
||||
| LEGACY-08 | P1 | Vendor page expired/permanent/missing snippet. | Conditional vendor authority enforced; useful empty/error state. |
|
||||
| LEGACY-09 | P2 | Inauguration/demo promotional page. | No production mutation, secret exposure or broken supported navigation. |
|
||||
| LEGACY-10 | P1 | Browser refresh/back/cold direct route. | No stale local auth assumption; correct guarded page. |
|
||||
| LEGACY-11 | P1 | Active backend endpoint changed since legacy UI shipped. | Current request schema (boundId/couponIds/skuId) respected; no `as any`-hidden mismatch. |
|
||||
| LEGACY-12 | P0 | API environment/base URL in standalone deployment. | Approved host; no unintended dev data or production mutation from staging. |
|
||||
| LEGACY-13 | P1 | Network/asset error, corrupt local state. | Recoverable safe behavior; no false order/compensation success. |
|
||||
| LEGACY-14 | P2 | Mobile browser keyboard/safe-area/maps and desktop layout. | Supported active pages remain usable and accessible. |
|
||||
|
||||
See [vendor](vendor-snippets.md), [security](authorization-api-contracts.md), [configuration](constants-configuration.md). Require a support decision per route before including legacy pages in a release gate.
|
||||
24
docs/test-cases/flash-delivery.md
Normal file
24
docs/test-cases/flash-delivery.md
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# Flash / one-hour delivery
|
||||
|
||||
Scope: regional flash enablement/schedules, flash discovery/cart/checkout, per-region price/availability and admin flash-order views.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| FLASH-01 | P0 | Enable A flash; F flash price distinct; COD order. | Flash price/fee, null slot, flash flag, correct A admin view. |
|
||||
| FLASH-02 | P0 | A disabled, B enabled; stale A checkout direct submit. | A blocked server-side; B unaffected and available. |
|
||||
| FLASH-03 | P0 | Regular-only/OOS/global-suspended/region-suspended/deleted SKU. | Cannot order in flash through any entry point or stale payload. |
|
||||
| FLASH-04 | P1 | Remove flash eligibility or change flash price in open cart. | UI refresh/reprice; server refuses disabled eligibility. |
|
||||
| FLASH-05 | P0 | Coupon min/cap near flash threshold with different regular price. | Flash goods basis on every surface and persisted order. |
|
||||
| FLASH-06 | P1 | Null/zero flash price. | Approved fallback/zero-price behavior; no accidental substitution mismatch. |
|
||||
| FLASH-07 | P1 | Regular and flash carts contain same SKU. | Independent quantities/fees; flash success clears only intended cart. |
|
||||
| FLASH-08 | P0 | Client supplies scheduled slot IDs in flash payload. | Flash group normalized to no scheduled slot; no scheduled capacity side effects. |
|
||||
| FLASH-09 | P1 | Select A2 address with distinct flash fee/threshold. | Address bound authoritative, not browsing A1. |
|
||||
| FLASH-10 | P1 | Enable/disable job in sanctioned staging clock harness. | Correct regional setting and discovery publication. |
|
||||
| FLASH-11 | P1 | Exact schedule boundary/midnight/timezone change. | Agreed timing applied once; no unexpected permanently enabled region. |
|
||||
| FLASH-12 | P1 | Flash combo/global product with independent A/B markets. | Correct per-region flash price/composition eligibility. |
|
||||
| FLASH-13 | P1 | All flash items become invalid before submit. | Clear no-items path, not empty order success. |
|
||||
| FLASH-14 | P1 | Customer detail/history/admin filters on flash order. | No bogus scheduled date; accurate region/flash status. |
|
||||
| FLASH-15 | P0 | Cancel flash COD order and restore coupon use. | Same lifecycle/financial invariants as scheduled group. |
|
||||
| FLASH-16 | P2 | Flash cart/deep-link success on iOS/Android/web. | Correct destination/back path; no regular route contamination. |
|
||||
|
||||
Scheduling fixtures must not trigger production cron changes; see [jobs](jobs-health.md).
|
||||
24
docs/test-cases/fulfillment.md
Normal file
24
docs/test-cases/fulfillment.md
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# Packaging, verification and delivery
|
||||
|
||||
Scope: admin updatePackaged/updateDelivered/updateOrderItemPackaging, customer tracking and vendor packaging where enabled.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| FUL-01 | P0 | Package one item then all items, verify, deliver. | Item/aggregate status agrees; customer tracking and timestamps reflect authorized transitions. |
|
||||
| FUL-02 | P1 | Multi-item partial packaging. | Not falsely marked fully packaged; remaining item visible. |
|
||||
| FUL-03 | P1 | Toggle package verification independently where supported. | Verification/packaged invariants consistent; no impossible completed state. |
|
||||
| FUL-04 | P1 | Reverse mistaken packaged/delivered state where allowed. | Approved reversal reflected in every view; no silent resurrection. |
|
||||
| FUL-05 | P0 | Attempt package/deliver cancelled order. | Invalid transition refused; cancelled remains cancelled. |
|
||||
| FUL-06 | P0 | B admin/customer/anonymous changes A order/item. | Server permission/region check; no unauthorized item update. |
|
||||
| FUL-07 | P0 | Item ID from another order combined with current order ID. | Association validated; unrelated item unchanged. |
|
||||
| FUL-08 | P1 | Missing/nonexistent order/item or wrong-type ID/flag. | Clear rejection, no false success. |
|
||||
| FUL-09 | P1 | Repeat same package/deliver update. | No duplicate completion timestamps/events or conflicting response. |
|
||||
| FUL-10 | P1 | Two admins toggle same item; cancel races with delivery. | Coherent legal final state; no delivered-and-cancelled contradiction. |
|
||||
| FUL-11 | P1 | Deliver one sibling of split group. | Only intended sub-order status changes; remaining sibling pending. |
|
||||
| FUL-12 | P1 | Status filters/pagination change after action. | Row correctly enters/leaves filtered lists without duplicates. |
|
||||
| FUL-13 | P1 | Mutation error, offline or timeout after commit. | Button recovers; refresh authoritative status before repeating. |
|
||||
| FUL-14 | P1 | Product deleted while order awaits packing. | Historic item label/qty usable; fulfilling supported order doesn't require live catalog item. |
|
||||
| FUL-15 | P1 | Delivery timestamp around midnight. | Same exact instant/timezone display across admin/customer. |
|
||||
| FUL-16 | P2 | Large order list, item switches, keyboard/dialog overlays. | Action clearly targets intended item; readable status feedback. |
|
||||
|
||||
Policy checkpoint: exact legal verification-before-delivery and reversal transitions. Do not assert a workflow not approved by operations.
|
||||
28
docs/test-cases/global-products.md
Normal file
28
docs/test-cases/global-products.md
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# Global products and elevation
|
||||
|
||||
Scope: superadmin global product CRUD, regional market-only editing, `superadmin.products.elevate`, per-region market seeding. Global product structural region is null; regional market data is independent.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| GP-01 | P0 | Create global product with two SKUs in global store. | One structural product; market rows for all existing regions; visible in A/B. |
|
||||
| GP-02 | P0 | Set different A/B prices, flash/stock/offer flags. | Each customer region sees its market values, same structural SKU ID. |
|
||||
| GP-03 | P0 | Edit existing SKU image/name/features using superadmin UI. | SKU IDs/count unchanged; no duplicate variants. Regression for review R2. |
|
||||
| GP-04 | P0 | Global suspension edit on an existing SKU. | Original SKU itself changes; no still-orderable original plus suspended duplicate. |
|
||||
| GP-05 | P1 | Add one new global SKU. | One additional SKU; seeded across regions; existing regional overrides preserved. |
|
||||
| GP-06 | P0 | Superadmin structural edit after A/B customized market values. | Existing market prices/stock untouched by structural save. |
|
||||
| GP-07 | P0 | Regional admin edits global name/images/store/features/type/deletes SKU. | Structural writes refused/ignored explicitly; only authorized market fields change. |
|
||||
| GP-08 | P0 | Regional A market edit then inspect B. | B values unchanged; no global kill-switch accidentally toggled. |
|
||||
| GP-09 | P1 | Create new region after global product exists. | New region receives required market rows and intentional initial values. |
|
||||
| GP-10 | P1 | Global product missing market row in sanctioned fixture. | Safe availability/initialization policy; no accidental free sale from missing price. |
|
||||
| GP-11 | P0 | Global product uses regional store or incompatible combo component. | Authoring ownership rules enforced; no mixed structural graph. |
|
||||
| GP-12 | P0 | Elevate regional product to global store. | Product/SKU IDs preserved; global visibility and required market rows established. |
|
||||
| GP-13 | P1 | Elevate already-global/missing product, invalid/global-store ID. | Clear rejection/idempotent response; no duplicate market rows. |
|
||||
| GP-14 | P0 | Staff/customer calls elevation/global CRUD directly. | Superadmin-only access enforced. |
|
||||
| GP-15 | P1 | Elevate product used by tags, groups, slots, carts, orders. | Associations/history remain coherent; target-region publication correct. |
|
||||
| GP-16 | P1 | Global soft-delete with orders in A/B. | Removed live everywhere; historical amounts/labels retained. |
|
||||
| GP-17 | P1 | Global SKU update uses another product's ID. | Foreign row not mutated; explicit validation. |
|
||||
| GP-18 | P1 | Concurrent region creation/global SKU creation/elevation. | One market row per SKU/region; no partial publish or missing seed. |
|
||||
| GP-19 | P1 | Bad upload or failed save/elevation midway. | No partial structural/region change; retry does not duplicate SKUs. |
|
||||
| GP-20 | P2 | Regional readonly badge/details and superadmin image picker. | Ownership obvious; cancel/reload preserves IDs and edits. |
|
||||
|
||||
Policy checkpoint: cross-region regional components in global combos must be explicitly restricted or given a serviceability policy. See [combos](combos.md).
|
||||
22
docs/test-cases/global-stores.md
Normal file
22
docs/test-cases/global-stores.md
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Global stores
|
||||
|
||||
Scope: `superadmin.globalStores`, regional read-only global stores and customer visibility in all regions.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| GSTORE-01 | P0 | Superadmin creates global store. | Global flag/null region consistent; discoverable in A/B. |
|
||||
| GSTORE-02 | P1 | Edit metadata/image; inspect both customer/admin clients. | Same structural identity; both regions refresh. |
|
||||
| GSTORE-03 | P0 | Regional admin tries global store edit/delete via direct ID. | Read-only restriction enforced server-side. |
|
||||
| GSTORE-04 | P0 | Anonymous/customer/staff calls superadmin CRUD. | Rejected without leaking privileged data. |
|
||||
| GSTORE-05 | P1 | Global store with no products, one global product, many variants. | Correct empty/list/detail states in each region. |
|
||||
| GSTORE-06 | P0 | Assign global product to regional store. | Rejected; global product remains structurally global. |
|
||||
| GSTORE-07 | P1 | Empty/duplicate name, malformed ID/image. | Validated; no partial global record or broken references. |
|
||||
| GSTORE-08 | P0 | Delete populated global store. | Dependency policy protects products/history in all regions. |
|
||||
| GSTORE-09 | P1 | Delete unused store then requery A/B. | Disappears across all intended surfaces; repeat safely fails. |
|
||||
| GSTORE-10 | P1 | Region created after global store. | Global store discoverable without per-region structural duplicate. |
|
||||
| GSTORE-11 | P1 | Image URL already normalized vs asset key. | Exactly one domain prefix; loaded image in every client. |
|
||||
| GSTORE-12 | P1 | Concurrent edit/delete or upload failure. | Coherent record and cache outcome; no orphan published product store. |
|
||||
| GSTORE-13 | P2 | Global badge/read-only affordance in regional UI. | Clear ownership and no misleading editable form. |
|
||||
| GSTORE-14 | P1 | Same-name regional/global records if allowed. | Selection uses IDs, not ambiguous label or first match. |
|
||||
|
||||
Related: [global products](global-products.md).
|
||||
22
docs/test-cases/jobs-health.md
Normal file
22
docs/test-cases/jobs-health.md
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Scheduled jobs, initialization and health
|
||||
|
||||
Scope: cache creator/store initialization, regional flash schedules, supported queue/job processing, service health and startup. Isolated scheduler/queue harness only; do not wait for or mutate production cron.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| JOB-01 | P1 | Backend startup with configured regional DB/KV/assets. | Health responds and required stores initialized before serving valid data. |
|
||||
| JOB-02 | P1 | Empty DB/regions/config in approved initialized fixture. | Explicit setup/empty state; no implicit migration execution. |
|
||||
| JOB-03 | P1 | Schedule cache refresh for A/B in same window. | Both scopes processed; no lost pending region. |
|
||||
| JOB-04 | P1 | New write during existing generation. | Final value eventually published, not discarded by reset flag. |
|
||||
| JOB-05 | P1 | Flash enable/disable at intended regional schedule boundaries. | Correct regional values and discovery updates; other region schedule untouched. |
|
||||
| JOB-06 | P1 | Midnight/IST/UTC crossover and delayed scheduler tick. | Defined once/next-state behavior; no permanently wrong flag. |
|
||||
| JOB-07 | P1 | Retry same queue event or duplicate scheduler invocation. | Approved repeat-safe effects; no duplicate order/notification side effect. |
|
||||
| JOB-08 | P1 | DB/KV/storage/provider unavailable during job. | Bounded retry/visible failure; no falsely completed publication. |
|
||||
| JOB-09 | P1 | Job interrupted/restarted midway. | Recovery resumes/rebuilds coherent state; no half-serving initialized caches. |
|
||||
| JOB-10 | P0 | Queue payload references foreign/deleted IDs or forged scope. | Correct authority/context validation; no arbitrary cross-region writes. |
|
||||
| JOB-11 | P1 | Health when dependencies degraded. | Accurate documented health semantics; no credential leak in diagnostic response. |
|
||||
| JOB-12 | P1 | Many regions/SKUs and supported bulk initialization. | All batches processed; no SQL parameter limit truncation. |
|
||||
| JOB-13 | P1 | Regional versions and in-memory store freshness after initialization. | No global singleton leaking another region's product flags. |
|
||||
| JOB-14 | P2 | Logs/alerts on permanent failure. | Actionable redacted error plus scope/event identity; no endless silent retries. |
|
||||
|
||||
Health HTTP semantics, job exactly-once/dedup behavior and retry limits must be explicit. Queue acceptance is not evidence of completed downstream delivery.
|
||||
26
docs/test-cases/location-region-switching.md
Normal file
26
docs/test-cases/location-region-switching.md
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# Location resolution and region switching
|
||||
|
||||
Scope: native location store/useRegion, web region gate/store, manual selector, GPS attachment, persisted browsing context.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| LOC-01 | P0 | Fresh signed-out/signed-in launch inside A. | One-shot resolution selects A; bound/catalog loads without mandatory login. |
|
||||
| LOC-02 | P1 | Permission denied/permanently denied/GPS unavailable. | Manual choice available; saved valid region preserved. |
|
||||
| LOC-03 | P1 | Coordinates outside all bounds; empty regions list. | Useful unavailable-service state, not endless spinner. |
|
||||
| LOC-04 | P0 | Delayed GPS A response after manual B selection. | Late automatic response cannot undo manual choice. |
|
||||
| LOC-05 | P1 | Location changes A→B while app remains open. | No unexpected continuous cart-clearing auto-switch. |
|
||||
| LOC-06 | P0 | Both A carts populated; request B switch, cancel then confirm. | Cancel preserves all; confirm clears regional carts/slots/coupons/address context and loads B. |
|
||||
| LOC-07 | P0 | Rapid A→B→A with delayed catalog responses. | Region-generation guard rejects stale B/A responses and mixed prices. |
|
||||
| LOC-08 | P1 | Relaunch saved region with changed/removed service metadata. | Selection revalidated; appropriate fallback, no invalid cached context. |
|
||||
| LOC-09 | P1 | Cold launch physically in B with A carts. | One-shot switch follows confirmation/reset policy; no silent mixed-region order. |
|
||||
| LOC-10 | P1 | U1 A/B addresses; default B while browsing A. | No automatic foreign default override; A browsing choice retained. |
|
||||
| LOC-11 | P0 | Explicit foreign-address switch confirm/cancel. | Same safe region-switch behavior and cleared regional state. |
|
||||
| LOC-12 | P1 | Missing coordinates but saved regional address. | Address-bound/effective-bound fallback works; warnings accurate. |
|
||||
| LOC-13 | P1 | Shared location-store consumers mount/unmount repeatedly. | No duplicate listeners/resolutions or memory leaks affecting selection. |
|
||||
| LOC-14 | P2 | Browser refresh/SSR/localStorage denied. | No hydration crash; usable manual region selector. |
|
||||
| LOC-15 | P1 | Force-quit during confirmed switch/state clearing. | Relaunch coherent region and carts; no half-reset checkout. |
|
||||
| LOC-16 | P1 | Resolve request offline/timeout, then restore network. | Bounded retry; manual selection remains usable. |
|
||||
| LOC-17 | P2 | Emulator/mock-location environment vs physical device. | Supported location path without production-only/emulator-only assumptions. |
|
||||
| LOC-18 | P0 | Change region while submit request pending. | No duplicate order or new-region UI falsely representing old-region order. |
|
||||
|
||||
Open policy: exact cold-start/manual-choice precedence after a populated saved cart. Do not label ambiguity PASS.
|
||||
26
docs/test-cases/notifications.md
Normal file
26
docs/test-cases/notifications.md
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# Push notifications, broadcasts and event messages
|
||||
|
||||
Scope: customer/staff push-token registration, admin targeted sends, order/cancel/complaint messages, deep links and queue integrations. **Only approved isolated recipients; no real customer broadcasts.**
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| PUSH-01 | P1 | Register anonymous device token, login and register again. | Token correctly associated/moved; no duplicate anonymous-plus-user recipient. |
|
||||
| PUSH-02 | P1 | Same token repeated or refreshed token/new device. | Defined upsert/multi-device behavior without duplicated sends. |
|
||||
| PUSH-03 | P0 | Logout U1, login U2 on same device. | Subsequent private U1 messages not exposed to U2 under approved token policy. |
|
||||
| PUSH-04 | P1 | Register staff token, trigger authorized test order notification. | Intended active regional staff receives correct order/region content. |
|
||||
| PUSH-05 | P0 | Send targeted message to approved U1 fixture. | Only intended user/devices receive it; no U2/broadcast leak. |
|
||||
| PUSH-06 | P0 | B staff submits A/private target IDs or customer calls send API. | Recipient selection/privilege scope enforced. |
|
||||
| PUSH-07 | P1 | Missing/invalid/expired token and empty title/body. | Clear validation/provider handling; no failed-recipient crash for whole batch. |
|
||||
| PUSH-08 | P1 | Duplicate user/token IDs, many supported recipients. | No duplicate intended messages; bounded batching/retry behavior. |
|
||||
| PUSH-09 | P0 | Notification with private order/complaint link clicked by wrong account. | Destination still enforces ownership; payload not authority. |
|
||||
| PUSH-10 | P1 | Cold/background/foreground tap on supported deep link. | Correct destination, auth return and region context. |
|
||||
| PUSH-11 | P1 | Invalid/deleted target route or unsupported link scheme. | Safe fallback, no script/external privilege route. |
|
||||
| PUSH-12 | P1 | Order/cancel/complaint queue event retried. | Approved deduplication; no duplicate customer-facing side effects. |
|
||||
| PUSH-13 | P1 | Provider timeout/token invalidation. | Retry/logging bounded; successful targets not falsely marked failed. |
|
||||
| PUSH-14 | P1 | Notifications denied/OS token unavailable. | Ordering unaffected; permission recovery UX appropriate. |
|
||||
| PUSH-15 | P2 | Physical-device receipt vs emulator queue acceptance. | Separate evidence; queue acceptance alone not PASS for actual receipt. |
|
||||
| PUSH-16 | P0 | Sensitive payloads/logs, admin/internal notes. | Only intended content/recipient; no secrets/internal staff notes in customer push. |
|
||||
| PUSH-17 | P1 | Staff deleted/reassigned after token registration. | No private old-region operational messages to stale identity. |
|
||||
| PUSH-18 | P1 | Scheduled/event send delayed past cancellation/deletion. | Safe stale-context behavior; no misleading upcoming-order claim. |
|
||||
|
||||
Provider-specific delivery guarantees and deduplication are policy/integration checkpoints. Telegram/event logs must be redacted in reports.
|
||||
26
docs/test-cases/order-edits-rebalance.md
Normal file
26
docs/test-cases/order-edits-rebalance.md
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# Order notes, delivery-charge removal and rebalance
|
||||
|
||||
Scope: customer updateUserNotes, admin notes/removeDeliveryCharge/rebalanceSlots. Explicit rebalance changes item pricing while preserving charged discount and historic delivery fee.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| EDIT-01 | P1 | Customer edits pending order instructions. | Latest notes persist/customer-admin agree; internal notes not overwritten. |
|
||||
| EDIT-02 | P1 | Admin annotates pending or delivered order. | Supported admin notes saved; customer notes distinguishable. |
|
||||
| EDIT-03 | P0 | Customer edits delivered/cancelled order or U2 order. | Refused; no history/ownership bypass. |
|
||||
| EDIT-04 | P1 | Empty/Unicode/long/markup instructions. | Approved clearing/limits; safely rendered as text. |
|
||||
| EDIT-05 | P0 | Remove delivery fee from authorized paid-fee COD order. | Stored fee and payable updated together exactly once. |
|
||||
| EDIT-06 | P1 | Remove already-zero fee or repeat request. | No negative total or duplicate discount; clear idempotent/conflict behavior. |
|
||||
| EDIT-07 | P0 | Remove fee from another region's order. | No unauthorized amount change. |
|
||||
| EDIT-08 | P1 | Remove fee on one split sibling. | Only assigned fee affected; sibling totals/coupon shares unchanged. |
|
||||
| EDIT-09 | P0 | Catalog price changes without explicit rebalance. | Historic item prices/order amount unchanged. |
|
||||
| EDIT-10 | P0 | Rebalance selected active slot with modified prices. | Item prices update; historic fee and stored discount frozen; every total reconciles. |
|
||||
| EDIT-11 | P0 | Rebalance multiple slots/mixed regions. | Only authorized slots/orders repriced; foreign IDs denied without partial writes. |
|
||||
| EDIT-12 | P0 | Delivered/cancelled orders in rebalance slot. | Skipped per policy; no historical paid amount rewrite. |
|
||||
| EDIT-13 | P1 | Target SKU deleted/missing/current price invalid. | Clear skip/failure policy; no zero-price historical corruption. |
|
||||
| EDIT-14 | P0 | Lower new goods below historic discount. | No negative payable; explicitly approved adjustment/block policy (BLOCKED until defined). |
|
||||
| EDIT-15 | P1 | Repeat rebalance, concurrent catalog edit and cancellation. | Coherent snapshot/legal state, no duplicate deductions or mixed prices. |
|
||||
| EDIT-16 | P1 | Error halfway through rebalance/remove fee. | Defined atomic outcome; no partial unreported amount changes. |
|
||||
| EDIT-17 | P1 | Decimal prices/caps after rebalance. | Agreed rounding; sum/detail use stored discount, never recomputed coupon. |
|
||||
| EDIT-18 | P2 | Notes/rebalance confirmation cancel and reopen detail. | No unsaved action; clear affected scope and refreshed result. |
|
||||
|
||||
Paid-order adjustment/refund interaction needs approved policy before execution. Avoid rebalancing shared production-like fixtures.
|
||||
28
docs/test-cases/orders.md
Normal file
28
docs/test-cases/orders.md
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# Order placement, history and detail
|
||||
|
||||
Scope: placeOrder, getOrders/getOrderById, success routes, upcoming-order glimpses and regional admin lists. Fixtures: U1/U2, A/B, single/split COD groups and historical deleted products.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| ORDER-01 | P0 | Valid U1 COD order with notes/address/coupons. | Correct rows/SKUs/quantities/region/amount; customer and A admin same identity/state. |
|
||||
| ORDER-02 | P0 | P/Q in S1/S2 checkout. | Exactly expected suborders/group; one fee and one usage per coupon; summed totals agree. |
|
||||
| ORDER-03 | P0 | Empty item array, unknown SKU, invalid quantity/slot. | No empty/invalid order, cart cleanup or consumed coupon. |
|
||||
| ORDER-04 | P0 | Zero/negative/fractional/huge quantity or duplicated selected lines. | Quantity contract and duplicate-line policy enforced; no unintended undercharge. |
|
||||
| ORDER-05 | P0 | Region A with B SKU/slot/address/bound; global SKU in A. | Foreign relationships rejected; valid global line accepted under A market. |
|
||||
| ORDER-06 | P0 | Suspended customer with existing token. | Placement blocked; unsuspension permits valid new request. |
|
||||
| ORDER-07 | P0 | U2 reads/cancels/notes U1 order; B admin reads A order. | Ownership/region enforced; no private payload leakage. |
|
||||
| ORDER-08 | P1 | U1 order history includes A/B orders. | Own cross-region history with accurate labels; current browsing region doesn't erase history. |
|
||||
| ORDER-09 | P1 | Many orders, page boundaries, filters, empty last page. | Stable order/pagination; no missing/duplicate rows or B-ID cursor skips. |
|
||||
| ORDER-10 | P1 | Missing/malformed/readable-vs-database order ID. | Correct target or clear not-found; no arbitrary parsed ID acceptance. |
|
||||
| ORDER-11 | P1 | Place order while history/upcoming widget already mounted. | Queries invalidated; new order visible without reinstall/manual stale cache. |
|
||||
| ORDER-12 | P0 | Change coupon/catalog after placement. | Original price/stored discount preserved in all detail views. |
|
||||
| ORDER-13 | P1 | Soft-delete product/variant/store dependency after order. | History still renders purchased identity, qty and charge. |
|
||||
| ORDER-14 | P0 | Database failure during multi-slot creation. | No partial group/items/status/payment linkage; cart not falsely cleared. |
|
||||
| ORDER-15 | P1 | Queue/Telegram/push fails after persistence. | Outcome inspectable; no duplicate order on blind retry; delivery integration recoverable. |
|
||||
| ORDER-16 | P0 | Rapid native/web submit twice vs raw concurrent API requests. | In-app guard prevents double tap; record deferred server-idempotency exposure separately. |
|
||||
| ORDER-17 | P1 | Request commits then response lost. | Inspect history before retry; no false claim of guaranteed server deduplication. |
|
||||
| ORDER-18 | P1 | Large supported cart/many slots and identical subtotals. | All items preserved; deterministic primary fee/usage allocation. |
|
||||
| ORDER-19 | P1 | Repeated order-detail fetch during status transition. | Coherent status/amount and group coupons, not mixed partial state. |
|
||||
| ORDER-20 | P2 | Native/browser deep links/back/reload to success/detail. | Correct order identity and navigation; no other user's cached detail. |
|
||||
|
||||
No general minimum-order value is required. Pending gateway orders are conditional coverage, not a supported online-payment claim.
|
||||
23
docs/test-cases/otp-authentication.md
Normal file
23
docs/test-cases/otp-authentication.md
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# OTP authentication — approval-required provider integration
|
||||
|
||||
Scope: `user.auth.sendOtp`/`verifyOtp`, provider verification credentials, automatic mobile-account creation and auth cookie/token. **Excluded from the default password regression.** Run only with explicit approval and an isolated SMS provider sandbox/test adapter. Never send to real customer mobiles, brute-force a real provider, or use a hardcoded production bypass code.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| OTP-01 | P1 | Approved test mobile requests code then verifies provider-valid code. | Correct customer identity/token/cookie; one successful verification. |
|
||||
| OTP-02 | P1 | Verify approved new mobile without pre-existing account. | Exactly one mobile account created; no duplicate credential/detail rows. |
|
||||
| OTP-03 | P0 | Existing password account verifies same mobile. | Same identity recovered, not a second customer losing history. |
|
||||
| OTP-04 | P0 | Wrong/empty/malformed OTP, no prior send or expired credentials. | Safe denial; no authenticated session or auto-created account. |
|
||||
| OTP-05 | P0 | OTP for mobile A submitted with mobile B. | Binding enforced; cannot authenticate another account. |
|
||||
| OTP-06 | P0 | Reuse successful code/verification ID. | Approved one-time guarantee; no replay-created account/session bypass. |
|
||||
| OTP-07 | P1 | Resend code before verifying previous code. | Defined supersession/validity; no ambiguous multiple active credentials. |
|
||||
| OTP-08 | P1 | Expiry exact boundary and client clock skew. | Provider/server time authoritative, clear expiry/retry. |
|
||||
| OTP-09 | P1 | Invalid phone length/prefix/country format/whitespace. | Agreed normalization consistent with password/account mobile identity. |
|
||||
| OTP-10 | P0 | Bounded abuse/rate-limit checks in isolated adapter. | Approved retry/cooldown controls; no unbounded messages or guess attempts. |
|
||||
| OTP-11 | P1 | Provider timeout/error on send or verify. | Recoverable error; no false success or unusable half-account. |
|
||||
| OTP-12 | P1 | Concurrent valid verifies for same new mobile. | One identity, consistent account state; no duplicate registration race. |
|
||||
| OTP-13 | P0 | Verification returns token/cookie/logs. | No provider secret/OTP credentials leaked; secure intended session transport. |
|
||||
| OTP-14 | P1 | Suspended/deleted-account mobile uses OTP. | Approved account restoration/suspension policy, no bypass of order restrictions. |
|
||||
| OTP-15 | P2 | UI requests resend/verification then background/back/offline retry. | No automatic real repeated sends; safe state recovery and destination return. |
|
||||
|
||||
Policy checkpoints: resend supersession, attempt limits, expiry, deleted-account re-creation and token/cookie semantics. These are expected integration requirements, not claims that current provider behavior is implemented or tested.
|
||||
28
docs/test-cases/payments-refunds.md
Normal file
28
docs/test-cases/payments-refunds.md
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# Payments and refunds — readiness and guarded current behavior
|
||||
|
||||
**Status:** Current customer UI disables online payment; gateway service code includes stubs. Only PAYMENT-01–03 are current release checks. Remaining cases are conditional readiness/security coverage for an approved sandbox implementation, not supported happy paths today. Never charge or refund production money.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| PAYMENT-01 | P0 | Attempt online selection in current UI. | Clearly unavailable/Coming Soon; no misleading successful online checkout. |
|
||||
| PAYMENT-02 | P0 | Place COD single/split checkout. | No gateway call; COD status and group money correct. |
|
||||
| PAYMENT-03 | P0 | Call unfinished online API in approved isolated fixture. | No false paid state, charge or misleading merchant ID; unsupported path explicit. |
|
||||
| PAYMENT-04 | P0 | Once enabled, sandbox single/split order payment. | One authoritative group amount in INR minor units; intended siblings paid once. |
|
||||
| PAYMENT-05 | P0 | Create merchant payment for U2's/missing/cancelled order. | Ownership/legal-state denial; no merchant payment created. |
|
||||
| PAYMENT-06 | P1 | Recreate pending merchant payment/retry request. | Supported existing pending record reused; no duplicate gateway order. |
|
||||
| PAYMENT-07 | P0 | Forged/empty/malformed signature or mismatched IDs. | Verification denied; order remains unpaid. |
|
||||
| PAYMENT-08 | P0 | Valid callback for another customer's payment. | Ownership still enforced beyond signature validity. |
|
||||
| PAYMENT-09 | P0 | Amount/currency tampering and UI-supplied payable. | Gateway/server authoritative group amount verified. |
|
||||
| PAYMENT-10 | P0 | Duplicate callback, replay, success webhook after failure. | Approved monotonic/idempotent status, no duplicate fulfillment. |
|
||||
| PAYMENT-11 | P1 | Decline/cancel/timeout/background gateway flow. | Accurate pending/failed state; usable retry/cart and no false success route. |
|
||||
| PAYMENT-12 | P0 | Mark other user's/successful payment failed. | Ownership/legal transitions enforced; paid order not reverted arbitrarily. |
|
||||
| PAYMENT-13 | P1 | Gateway committed, DB update or response fails. | Reconciliation strategy; no repeated charge on blind retry. |
|
||||
| PAYMENT-14 | P0 | Refund authorized paid cancelled order partially/fully. | Never exceeds net collected amount; correct status and intended recipient. |
|
||||
| PAYMENT-15 | P0 | Refund COD/unpaid/foreign-region/foreign-user order. | Appropriate denial; no money transfer or false refund ledger. |
|
||||
| PAYMENT-16 | P0 | Repeat/concurrent refund and duplicate webhook. | Exactly one approved refund; cumulative amount ≤ collected. |
|
||||
| PAYMENT-17 | P1 | Refund pending/fails/settles late, then customer refreshes. | Accurate ledger/status; failure doesn't claim settled money. |
|
||||
| PAYMENT-18 | P1 | Partial split cancellation and fees/coupon allocations. | Approved refundable amount derives from persisted charges, not current promotions. |
|
||||
| PAYMENT-19 | P0 | Secrets/card/payment payload in logs/API. | Credentials redacted; only required nonsecret response fields. |
|
||||
| PAYMENT-20 | P1 | Zero-amount order and rounding edge. | Defined no-charge gateway path; no invalid minor-unit amount. |
|
||||
|
||||
Record sandbox transaction IDs in private evidence only. Refund allocation, successful-payment reversal and group settlement policy require approval before execution.
|
||||
28
docs/test-cases/prices-stock-suspension.md
Normal file
28
docs/test-cases/prices-stock-suspension.md
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# Prices, stock, offers and suspension
|
||||
|
||||
Scope: Prices Overview, variant stock dialog, market-only global product form and availability cache. Fixtures: multi-SKU P and G with distinct A/B markets.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| STOCK-01 | P0 | Edit regular/MRP/flash prices by `skuId`. | Correct variant and A market updated; product ID not mistaken for SKU ID. |
|
||||
| STOCK-02 | P1 | Bulk edit several regional SKUs. | Every intended change persisted; untouched fields/siblings unchanged. |
|
||||
| STOCK-03 | P0 | Bulk edit a global SKU's A price/flash flag. | Allowed market-only update; B unchanged. Regression R6. |
|
||||
| STOCK-04 | P1 | Mixed global/regional bulk batch; add a foreign B-only SKU. | Valid mixed batch works; foreign-ID rejection does not partially apply batch. |
|
||||
| STOCK-05 | P0 | Mark one variant OOS and restore it. | Only that variant changes; product summary shows Partial; server blocks OOS SKU. |
|
||||
| STOCK-06 | P0 | Superadmin global suspension while regional markets remain available. | All regions blocked; regional admin cannot bypass global suspension. |
|
||||
| STOCK-07 | P0 | Regional suspension, save, reopen. | Checkbox/state reflects regional suspension, not global flag. Regression R5. |
|
||||
| STOCK-08 | P0 | Reopen suspended global SKU, edit price only, save. | Regional suspension retained; not silently made orderable. |
|
||||
| STOCK-09 | P1 | Globally suspended SKU opened by regional admin. | Global kill-switch displayed separately; no unintended regional flag write. |
|
||||
| STOCK-10 | P1 | Toggle offer true/false in A. | A Offers membership updates; B's offer membership unchanged. |
|
||||
| STOCK-11 | P1 | Zero/null flash/MRP vs omitted fields. | Explicit clearing differs from no change; approved zero-price rules. |
|
||||
| STOCK-12 | P1 | Negative/fractional/extreme/nonfinite monetary values. | Consistent validation and finite precision; no malformed availability JSON. |
|
||||
| STOCK-13 | P1 | Empty update and duplicate IDs in bulk payload. | Empty-write rejection/defined response; deterministic no duplicate processing. |
|
||||
| STOCK-14 | P0 | Anonymous/customer/A admin supplies unauthorized SKU. | No price/stock writes or private cross-region details. |
|
||||
| STOCK-15 | P1 | SKU deleted while price/stock form open. | Save rejects obsolete target; no resurrected market-only phantom. |
|
||||
| STOCK-16 | P1 | Two admins toggle/edit same variant simultaneously. | Coherent final state; stale update behavior visible/documented. |
|
||||
| STOCK-17 | P0 | Price/stock changes while cart/checkout already open. | Refresh/reprice policy; backend uses current price and rejects unavailable item. |
|
||||
| STOCK-18 | P1 | Market row absent, edit price without full product save. | Correct row initialized once; no B default override. |
|
||||
| STOCK-19 | P1 | Stock/availability publication fails or delayed. | Recoverable stale state; converge inside deadline; stale server submission still blocked. |
|
||||
| STOCK-20 | P2 | Stock dialog cancel, scrolling variants, rapid taps. | No unsaved mutation; targeted SKU identity stable. |
|
||||
|
||||
General catalog edit must never automatically reprice historical orders; explicit rebalance is tested separately.
|
||||
30
docs/test-cases/pricing-delivery-fees.md
Normal file
30
docs/test-cases/pricing-delivery-fees.md
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# Cart pricing, delivery fees and persisted totals
|
||||
|
||||
Scope: shared cart-pricing helpers, authoritative order pricing, client previews and order detail. Fixtures: T threshold, D fee, different flash/regular prices, A1/A2 fees, multiple slots and decimal amounts.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| MONEY-01 | P0 | Goods T−0.01/T/T+0.01 without coupon. | Fee below T only; at T free; every bill/persisted surface agrees. |
|
||||
| MONEY-02 | P0 | Small order below historical minimum-order config. | Accepted under no-general-minimum policy; fee still charged as applicable. |
|
||||
| MONEY-03 | P0 | Percent coupon on goods with paid delivery. | Delivery never part of coupon base. |
|
||||
| MONEY-04 | P0 | Flat coupon below/equal/above goods and own maxValue. | Discount capped at eligible goods and own cap; nonnegative payable. |
|
||||
| MONEY-05 | P0 | Percent coupon below/equal/above maxValue boundary. | Correct capped discount; finite values and agreed rounding. |
|
||||
| MONEY-06 | P0 | Coupon moves goods from above T to below/exactly T. | Fee calculated from defined post-discount subtotal, consistent UI/server. |
|
||||
| MONEY-07 | P0 | Two slots with unequal goods and paid delivery. | Fee on highest-goods primary once; sum equals group payable. |
|
||||
| MONEY-08 | P1 | Equal-goods slots and reverse insertion order. | Defined deterministic tie; fee/usage on same primary order. |
|
||||
| MONEY-09 | P0 | Targeted coupon matches only second slot's SKU. | Discount allocated only to eligible lines/suborders. |
|
||||
| MONEY-10 | P0 | Partially overlapping/disjoint coupon targets. | Each contribution respects targets/cap; no unrelated goods discounted. |
|
||||
| MONEY-11 | P0 | Several whole-cart coupons exceed all goods. | Combined discount ≤ goods; no negative order totals. |
|
||||
| MONEY-12 | P0 | ₹100 SKU A in S1, ₹900 unrelated S2, two ₹100 A-targeted coupons. | A absorbs at most ₹100 discount; S1 nonnegative, S2 still ₹900 before assigned fee. Regression R3. |
|
||||
| MONEY-13 | P0 | ₹100 goods, two nonexclusive ₹80 flat coupons. | UI and server cap to ₹100, not negative preview. Regression R4. |
|
||||
| MONEY-14 | P1 | ₹99.99/₹10.05 unit prices, 3/7 quantities, 12.5% and thirds allocation. | Approved minor-unit rounding/residual policy; sum of stored shares exactly reconciles. |
|
||||
| MONEY-15 | P0 | A1/A2 selected-address switch, same goods. | Correct bound charge/threshold only; no regional catalog change. |
|
||||
| MONEY-16 | P0 | Client manipulates totals/discount/price fields or bound ID. | Authoritative prices/coupons/address bound used; no client-driven discount. |
|
||||
| MONEY-17 | P0 | Flash SKU price differs greatly from regular. | Flash price drives goods, coupon min/cap and threshold. |
|
||||
| MONEY-18 | P1 | Fully discounted goods with nonzero fee vs free fee. | Correct D or zero total; authoritative zero handled in success UI. |
|
||||
| MONEY-19 | P0 | Catalog/coupon changes after order placed. | Stored discount/price/detail stable; no recomputation from edited coupon. |
|
||||
| MONEY-20 | P1 | Missing/invalid market/config values, zero/null cap. | Clear validation/fallback; no NaN/Infinity/negative price. Zero-cap semantics explicitly approved. |
|
||||
| MONEY-21 | P0 | Cancel/refund/remove fee/rebalance after split order. | Derived monetary changes reconcile without duplicate fee or lost historic discount. |
|
||||
| MONEY-22 | P1 | Large supported quantity/price/cart size. | No overflow, precision loss beyond policy, or dropped discount allocations. |
|
||||
|
||||
Policies to resolve before numerical PASS: compound percentage basis, currency rounding and residual allocation, zero maxValue meaning. Sorting percentage coupons before flat coupons is required regardless of percentage basis.
|
||||
22
docs/test-cases/product-groups.md
Normal file
22
docs/test-cases/product-groups.md
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Product groups
|
||||
|
||||
Scope: admin group CRUD/membership and group-to-slot association. Confirm snapshot versus live group membership semantics before executing dependency cases.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| GROUP-01 | P1 | Create A group with P/G SKU members. | One group and correct membership; list/detail reload accurately. |
|
||||
| GROUP-02 | P1 | Edit group metadata, add/remove members. | Exactly intended relation changes; other groups unaffected. |
|
||||
| GROUP-03 | P1 | Attach group to new scheduled slot. | Intended member SKUs available once in slot. |
|
||||
| GROUP-04 | P1 | SKU appears explicitly and via two groups on same slot. | No duplicate slot/cart items or duplicate relation rows. |
|
||||
| GROUP-05 | P0 | A group references B-only SKU; B edits A group ID. | Cross-region relation/access rejected before writes. |
|
||||
| GROUP-06 | P1 | Missing IDs, duplicate members/name, empty group. | Agreed validation/deduplication and empty-group policy. |
|
||||
| GROUP-07 | P1 | Group member soft-deleted/suspended after slot creation. | Serviceability filtering consistent with agreed membership semantics. |
|
||||
| GROUP-08 | P1 | Edit membership after slots reference the group. | Snapshot/live policy explicitly observed; customer and admin agree. |
|
||||
| GROUP-09 | P1 | Delete unused group. | Group/membership removed; products retained. |
|
||||
| GROUP-10 | P0 | Delete group attached to active/historical slot. | Defined dependency protection/cascade; no invalid historical order links. |
|
||||
| GROUP-11 | P1 | Concurrent group update/slot assignment. | No stale/missing duplicated slot memberships. |
|
||||
| GROUP-12 | P1 | Save fails midway or repeated delete. | No partial member deletion; clear result on retry. |
|
||||
| GROUP-13 | P2 | Large group picker/filter, global badge and readonly members. | Correct selected IDs; no labels mistaken for product IDs. |
|
||||
| GROUP-14 | P1 | Rename group with orders in attached slots. | Historic orders/slot times and amounts unchanged. |
|
||||
|
||||
Related: [scheduled slots](scheduled-slots.md), [authorization](authorization-api-contracts.md).
|
||||
24
docs/test-cases/product-tags-ordering.md
Normal file
24
docs/test-cases/product-tags-ordering.md
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# Product tags, popular items and ordering
|
||||
|
||||
Scope: admin dashboard tags, tag images/membership/related stores, tag ordering, Popular Items and All Items Order.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| TAG-01 | P1 | Create dashboard tag with image, P/G and related store. | Correct A section, memberships, image and links published. |
|
||||
| TAG-02 | P1 | Edit membership/name/description/image. | Latest values; no duplicated membership or broken old image. |
|
||||
| TAG-03 | P1 | Reorder tags and products within a tag. | Stable saved order across reload and customer views. |
|
||||
| TAG-04 | P1 | Configure Popular and All Items Order. | Visible IDs sorted as configured; unconfigured items follow defined fallback. |
|
||||
| TAG-05 | P0 | A ordering changes while B has different order. | B remains unchanged; no global-key leakage. |
|
||||
| TAG-06 | P0 | Foreign B SKU/store/tag in A relation mutation. | Rejected; no cross-region membership. Global SKU accepted where supported. |
|
||||
| TAG-07 | P1 | Duplicate name/IDs, empty tag/product set. | Agreed uniqueness/deduplication and useful empty section handling. |
|
||||
| TAG-08 | P1 | Ordering contains deleted/missing/hidden/foreign IDs. | Validated/filtered without crash or reappearing hidden products. |
|
||||
| TAG-09 | P1 | Tag is nondashboard vs dashboard toggle. | Correct inclusion; no accidental loss of other tags. |
|
||||
| TAG-10 | P1 | Delete tag with memberships and image. | Tag gone; products preserved in other lists; cleanup failure not undeletable row. |
|
||||
| TAG-11 | P1 | Invalid/unclaimed replacement image. | Failed update preserves old tag/image/membership. |
|
||||
| TAG-12 | P1 | Simultaneous ordering/membership edits. | No erased sibling lists; deterministic final configuration. |
|
||||
| TAG-13 | P1 | Save order after some products deleted. | Clear reconciliation/validation; no partially applied ordering. |
|
||||
| TAG-14 | P1 | Rapid A/B tag edits; customer fresh/open sessions. | Correct per-region publication within deadline. |
|
||||
| TAG-15 | P2 | Drag reorder on native/web; scroll, cancel and reload. | ID-based positions persist only on supported save path. |
|
||||
| TAG-16 | P0 | Anonymous/customer or B admin edits A tag by ID. | Server denies without partial updates. |
|
||||
|
||||
Policy checkpoint: duplicate-name normalization and fallback order for omitted IDs.
|
||||
24
docs/test-cases/profile-account-lifecycle.md
Normal file
24
docs/test-cases/profile-account-lifecycle.md
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# Profile and account lifecycle
|
||||
|
||||
Scope: `getSelfData`, `updateProfile`, `updatePassword`, `deleteAccount`, profile/native Me/web Me. Use disposable accounts for destructive cases.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| PROFILE-01 | P1 | Read profile, edit supported fields, relaunch. | Saved values agree in customer and authorized admin views. |
|
||||
| PROFILE-02 | P1 | Add/replace/remove profile image. | Correct preview/persisted image; previous image handled safely. |
|
||||
| PROFILE-03 | P1 | Change password, logout, try old then new password. | Old credentials fail; new credentials work. |
|
||||
| PROFILE-04 | P1 | Empty optional fields, null dates, Unicode/long names/bio. | Supported clearing/limits; no accidental literal null/undefined. |
|
||||
| PROFILE-05 | P1 | Invalid date, future birth date, leap date, timezone boundary. | Validations/serialization consistent; no shifted birth day. |
|
||||
| PROFILE-06 | P0 | Change identifier to another account's mobile/email. | Conflict rejected without moving identity or merging accounts. |
|
||||
| PROFILE-07 | P0 | U2 submits U1 identity fields/ID or image references. | Only authenticated account changes; foreign-owned assets rejected. |
|
||||
| PROFILE-08 | P1 | Password mismatch/invalid current verification where required. | Rejection leaves usable old credentials. |
|
||||
| PROFILE-09 | P0 | Delete with wrong confirmation mobile, then correct confirmation. | Wrong request has no effect; valid deletion follows retention policy and logs out. |
|
||||
| PROFILE-10 | P0 | Use deleted account's old token and attempt relogin. | No access to deleted account/private data or new orders. |
|
||||
| PROFILE-11 | P0 | Delete account with historical orders/complaints/payment references. | Required audit/history retained or anonymized by approved policy; no unrelated-user damage. |
|
||||
| PROFILE-12 | P1 | Concurrent profile edits from two devices. | Coherent final fields; no credential/detail row inconsistency. |
|
||||
| PROFILE-13 | P1 | Upload succeeds but profile save fails. | No false image assignment; retry/cleanup recoverable. |
|
||||
| PROFILE-14 | P1 | Disconnect during password/deletion save. | Determine persisted outcome before retry; no half-account state. |
|
||||
| PROFILE-15 | P2 | Profile logout/login across native/web. | Fresh private caches; no cross-account profile flash. |
|
||||
| PROFILE-16 | P1 | Account deletion UI twice / cancellation of confirmation. | Cancel changes nothing; repeated confirmed action cannot affect another account. |
|
||||
|
||||
Open policy: deletion retention/anonymization and old-token invalidation after password change must be explicitly agreed. See [README](README.md).
|
||||
30
docs/test-cases/recovery-platform-accessibility.md
Normal file
30
docs/test-cases/recovery-platform-accessibility.md
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# Recovery, cross-platform behavior and accessibility
|
||||
|
||||
Scope: common user/admin/superadmin journeys on Android/iOS/Chromium, errors/loading, storage/session recovery, keyboard/navigation, accessibility and static help/legal screens.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| UX-01 | P1 | Slow/offline startup with persisted cart/session/region. | Bounded clear loading/error; no silent cart reset or private-data flash. |
|
||||
| UX-02 | P1 | Catalog endpoint accepts request but never responds. | Deadline/abort/retry surfaced, not permanent spinner; baseline request cap verified where configured. |
|
||||
| UX-03 | P1 | Asset/discovery/auth request returns 400/401/403/404/409/500. | Appropriate recovery/messages; no success toast on rejected write. |
|
||||
| UX-04 | P0 | Disconnect before vs after order/save commit. | Outcome checked authoritatively; no blind duplicate/false rollback claim. |
|
||||
| UX-05 | P1 | Background/force-quit/rotate during form/upload/checkout. | Coherent relaunch; guards not permanently stuck. |
|
||||
| UX-06 | P1 | Storage missing/corrupt/full/permission denied. | Recoverable state with correct auth/region boundaries. |
|
||||
| UX-07 | P1 | Deny/revoke camera/photo/location/notification permission. | Specific recoverable action; unrelated core purchasing usable. |
|
||||
| UX-08 | P1 | Browser refresh/back/direct protected links and native back/swipe. | Correct auth return/state; no navigation loop or wrong entity. |
|
||||
| UX-09 | P1 | Keyboard opens over last form controls; scroll/hide/save. | All inputs/buttons reachable; saved values not accidentally changed. |
|
||||
| UX-10 | P2 | Small/large display, safe areas, landscape and text scaling. | No clipped totals/error/action or overlapping inaccessible control. |
|
||||
| UX-11 | P2 | Screen reader through product/cart/address/checkout/admin toggles. | Named controls, logical focus, selected/disabled state and accessible errors. |
|
||||
| UX-12 | P2 | Contrast/focus visibility, web keyboard-only navigation. | Actions reachable without mouse/color-only interpretation. |
|
||||
| UX-13 | P1 | Multiple bottom sheets/dialogs with dimmed backdrop. | Only active dialog editable; close/back returns correct screen. |
|
||||
| UX-14 | P1 | Rapid tapping/fetch refresh/route changes. | No stale response overwrite, duplicate action or state update crash. |
|
||||
| UX-15 | P1 | App build older/newer than supported version policy. | Correct update notice/store URL/closeability; no hardcoded wrong platform link. |
|
||||
| UX-16 | P1 | Read support/welcome/about/terms in A and B. | Region-specific support where configured; legal/static text reachable and accurate. |
|
||||
| UX-17 | P2 | Broken/missing image and long customer/product names. | Useful placeholder/truncation without concealing critical item identity. |
|
||||
| UX-18 | P1 | Date/time device timezone/clock skew. | Server boundaries authoritative; local display no wrong day/slot. |
|
||||
| UX-19 | P1 | User switches account/region while queries in flight. | Stale private/regional response discarded; current context preserved. |
|
||||
| UX-20 | P2 | Run same critical flow native/web/admin native/admin-web. | Business outcomes match; explicitly record platform-only differences. |
|
||||
| UX-21 | P1 | Retry button after a failed write/query. | Recoverable single attempt with preserved safe inputs; no eternal disabled button. |
|
||||
| UX-22 | P1 | App loses network after catalog loads; attempt fresh purchase. | No false offline order acceptance; cached quote clearly nonauthoritative. |
|
||||
|
||||
Case execution must capture real screen state: a hidden sheet or test-harness locator failure is BLOCKED, not evidence of an application defect. Server idempotency is deferred; document ambiguous-retry risk rather than claim it is guaranteed solved.
|
||||
28
docs/test-cases/regional-products.md
Normal file
28
docs/test-cases/regional-products.md
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# Regional products and variants
|
||||
|
||||
Scope: regional admin product CRUD, native/admin-web forms, SKU features/images and customer publication. Fixtures: A product P with two variants, B product Q, valid store/upload keys. [Shared rules](README.md) apply; all cases NOT RUN.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| PROD-01 | P0 | Create A product with two SKUs, quantity features and prices. | Exactly one product/two variants; correct store, features, images and price in A. |
|
||||
| PROD-02 | P1 | Edit name, descriptions, variant name/features and images. | Existing SKU IDs/count retained; list/detail/customer surfaces agree. |
|
||||
| PROD-03 | P1 | Add third variant, assign slot, order it. | Exactly one new SKU; siblings unchanged and orderable. |
|
||||
| PROD-04 | P1 | Remove one variant with historical orders. | Live catalog hides it; history retains original identity and billed amount. |
|
||||
| PROD-05 | P0 | Delete whole product after ordering it. | Soft deletion hides live product; historical orders remain readable. |
|
||||
| PROD-06 | P1 | Create duplicate name, then reuse name after soft deletion. | Agreed uniqueness respected; supported name reuse does not revive old rows. |
|
||||
| PROD-07 | P1 | No SKUs, missing quantity feature, empty feature value, missing store. | Clear validation; no orphan product/SKU/features/market rows. |
|
||||
| PROD-08 | P1 | Zero/negative/nonfinite price, MRP below price, extreme values. | Approved monetary rules; finite safe prices, no silent invalid sale. Zero-price policy explicitly confirmed. |
|
||||
| PROD-09 | P1 | Empty/Unicode/long name/description; same label on variants. | Agreed limits; SKU identity never derived from label alone. |
|
||||
| PROD-10 | P0 | Admin B reads/edits/deletes A IDs; A submits B store/component/SKU IDs. | Rejected without cross-region writes or data exposure. |
|
||||
| PROD-11 | P0 | Existing SKU ID from another product included in update. | Cannot alter foreign variant or silently treat it as an intended insert. |
|
||||
| PROD-12 | P1 | Re-send owned image keys; change only one variant's image. | No requirement to reupload owned images; siblings' images preserved. |
|
||||
| PROD-13 | P0 | One valid and one bad/unclaimed image in create/update. | Rejected before product changes/old-image deletion; retry succeeds after correction. |
|
||||
| PROD-14 | P1 | Duplicate SKU/feature IDs in payload; repeated component entry. | Agreed deduplication or validation; no duplicate relation rows. |
|
||||
| PROD-15 | P1 | Cancel form, then reopen existing product. | Unsaved changes discarded; saved data not overwritten. |
|
||||
| PROD-16 | P1 | Double save/concurrent same-name create. | One complete creation or clear conflict; no misleading success. |
|
||||
| PROD-17 | P1 | Timeout before/after commit; inspect by ID/name before retry. | Complete or absent write; no half-created variants/duplicate retry. |
|
||||
| PROD-18 | P1 | Delete missing ID or delete already-deleted product. | Clear not-found/conflict; no unrelated row affected. |
|
||||
| PROD-19 | P1 | Change product type or increment step with existing cart/orders. | Approved transition/quantity rules; old orders unchanged. |
|
||||
| PROD-20 | P2 | Keyboard obscures feature/image controls; large variant list. | Scroll/focus/save usable on native and web; no accidental variant edits. |
|
||||
|
||||
Related: [stock](prices-stock-suspension.md), [combos](combos.md), [global products](global-products.md), [uploads](uploads-images.md).
|
||||
23
docs/test-cases/regional-stores.md
Normal file
23
docs/test-cases/regional-stores.md
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# Regional stores
|
||||
|
||||
Scope: admin store CRUD and customer store list/detail. Fixtures store A/B, empty store and historical product/order dependencies.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| STORE-01 | P0 | Admin A creates store with valid image/description. | Regional A record; visible in A after publication. |
|
||||
| STORE-02 | P1 | Edit name/description/image; relaunch customer. | List/detail/product store labels agree. |
|
||||
| STORE-03 | P1 | Empty store detail, then attach first product. | Intentional empty state; correct first product publication. |
|
||||
| STORE-04 | P0 | Browse B/admin B fetch A store by ID. | No foreign private store data/mutation. |
|
||||
| STORE-05 | P1 | Empty/long/Unicode/duplicate name and optional image. | Agreed validation/normalization without partial store. |
|
||||
| STORE-06 | P0 | Customer/anonymous creates or deletes store. | Staff authorization required. |
|
||||
| STORE-07 | P0 | Attach regional product to B store/global store through A create. | Allowed ownership rules enforced; no mixed association. |
|
||||
| STORE-08 | P0 | Delete store with products or other required references. | Approved dependency block; no orphan products/history. |
|
||||
| STORE-09 | P1 | Delete unreferenced store twice. | First persists; second clear missing/conflict, no accidental other delete. |
|
||||
| STORE-10 | P1 | Replace image with bad/unclaimed upload key. | Store and old image unchanged; safe recovery. |
|
||||
| STORE-11 | P1 | Large product list with deleted/hidden variants. | Only purchasable/visible catalog entries shown; correct pagination if supported. |
|
||||
| STORE-12 | P1 | Double create/save timeout and retry. | Inspect final state; no duplicate/unclaimed relation. |
|
||||
| STORE-13 | P1 | Remove owner field from legacy form/payload. | Current contract works without owner; no lost required store data. |
|
||||
| STORE-14 | P2 | Deep link unknown/deleted store, refresh/back. | Clear not-found/back path; no stale broken detail. |
|
||||
| STORE-15 | P1 | Successful mutation followed by cache/upload-cleanup failure. | Persisted outcome explicit; eventual repair, no false rollback claim. |
|
||||
|
||||
Related: [global stores](global-stores.md), [uploads](uploads-images.md).
|
||||
23
docs/test-cases/regions.md
Normal file
23
docs/test-cases/regions.md
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# Region administration
|
||||
|
||||
Scope: `superadmin.regions`, public region listing and region summary selectors. Regions cannot be deleted; cleanup must not assume deletion.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| REGION-01 | P0 | Create region with valid initial bound/config. | Complete region; public selector and admin assignment can use it. |
|
||||
| REGION-02 | P1 | Read/list region; edit name and supported metadata. | Stable ID; changes propagate without detaching products/staff. |
|
||||
| REGION-03 | P1 | New region with no products/orders. | Intentional empty states, not initialization crash. |
|
||||
| REGION-04 | P1 | Create missing/empty bounds or malformed initial data. | Rejected; no orphan region/constants/bounds. |
|
||||
| REGION-05 | P1 | Empty/duplicate/Unicode/long name. | Agreed uniqueness/limits; IDs not inferred from labels. |
|
||||
| REGION-06 | P0 | Staff/customer/anonymous attempts region mutation. | Superadmin-only access enforced server-side. |
|
||||
| REGION-07 | P1 | Read/update missing, negative or wrong-type region ID. | Clear rejection, not empty false-success update. |
|
||||
| REGION-08 | P0 | Create region when global products already exist. | Required per-region market rows seeded coherently; no unintended zero-price sale. |
|
||||
| REGION-09 | P1 | Region create fails during bound or global market-row seeding. | Atomic/recoverable initialization; no partially selectable region. |
|
||||
| REGION-10 | P1 | Double create, concurrent same-name creation. | One complete region or documented conflict; no orphan rows. |
|
||||
| REGION-11 | P1 | Update region while users browse/order. | Existing IDs/order region labels remain coherent; no data moves accidentally. |
|
||||
| REGION-12 | P1 | Attempt deletion through UI/direct API. | Unsupported action clearly unavailable; no destructive side effects. |
|
||||
| REGION-13 | P2 | Large list and renamed region in saved selection. | Selected region resolves by ID; stale labels refresh. |
|
||||
| REGION-14 | P0 | Inspect public list payload. | Only intended region/bound discovery metadata, no private staff/account data. |
|
||||
| REGION-15 | P1 | Newly created region publication to fresh/existing customers. | Discoverable within bounded deadline; B unchanged. |
|
||||
|
||||
Related: [bounds](bounds.md), [global products](global-products.md), [cache](cache-publication.md).
|
||||
26
docs/test-cases/reserved-coupons.md
Normal file
26
docs/test-cases/reserved-coupons.md
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# Reserved redemption and cancellation-generated coupons
|
||||
|
||||
Scope: reserved coupon creation/listing, redeemReservedCoupon, personal-coupon creation and generateCancellationCoupon. Use isolated disposable codes/customers.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| RES-01 | P0 | Admin creates reserved code; U1 redeems and spends. | One claim/personally scoped coupon with preserved money/expiry/targets/region. |
|
||||
| RES-02 | P0 | U2 redeems already-claimed code. | Denied; U1 coupon unaffected. |
|
||||
| RES-03 | P0 | Simultaneous U1/U2 claims of one code. | Exactly one claimant/coupon; no double redemption or orphan personal coupon. |
|
||||
| RES-04 | P1 | Empty/malformed/unknown/code case-space variants. | Approved normalization; safe rejection; valid retry usable. |
|
||||
| RES-05 | P0 | Expired code or claimed coupon after same deadline. | Single `validTill` applies to claiming and spending. |
|
||||
| RES-06 | P0 | First-order-only reserved code claimed/spent by existing customer. | Consistent effective-order eligibility; no loophole through redemption. |
|
||||
| RES-07 | P0 | A-regional code redeemed/spent while browsing B. | Region policy enforced on both claim and spend; no region-widened personal coupon. |
|
||||
| RES-08 | P1 | SKU targets/exclusive/max-user-limit carried into personal coupon. | Exact inherited restrictions, not an unrestricted replacement. |
|
||||
| RES-09 | P1 | Redemption fails between personal insert and redeemed flag. | Atomic outcome; no burned code without coupon or double claim retry. |
|
||||
| RES-10 | P1 | My Coupons/list immediately after claim and after restart. | Fresh personal coupon visible once with accurate state. |
|
||||
| RES-11 | P0 | Anonymous redeem; U2 guessed personal coupon ID. | Authentication/ownership enforced. |
|
||||
| RES-12 | P1 | Reserved batch creation duplicates/collision or bad target. | Explicit atomic/partial outcome; no hidden redeemed/created subset. |
|
||||
| RES-13 | P0 | Generate cancellation coupon for authorized cancelled order. | Correct intended user/value/expiry/region; not spendable by another customer. |
|
||||
| RES-14 | P0 | Generate against B order, active/delivered/missing order, arbitrary user. | Access/status/association rules enforced before coupon creation. |
|
||||
| RES-15 | P1 | Repeat generation or concurrent admin requests. | Approved one-coupon-per-event rule; no accidental compensation duplicates. |
|
||||
| RES-16 | P1 | Cancel generated coupon use then fully cancel its order group. | Usage restoration follows normal group semantics, not code re-redemption. |
|
||||
| RES-17 | P2 | Secret shown in logs/screens/list to unauthorized user. | Secrets not exposed; sensitive evidence redacted. |
|
||||
| RES-18 | P1 | Claim timeout after commit, retry same account. | Clear already-claimed/recoverable result; no duplicate personal coupons. |
|
||||
|
||||
Policy checkpoints: compensation amount formula, repeat generation allowance, and reserved-code global authoring support. Unsupported variants remain BLOCKED/conditional.
|
||||
20
docs/test-cases/reviews.md
Normal file
20
docs/test-cases/reviews.md
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# Product reviews — conditional/unmaintained
|
||||
|
||||
**Status:** Prior product scope marks reviews unmaintained. These are proposed coverage if restored; no assumption of currently supported creation/response. Scope: getProductReviews/createReview/admin responses and uploaded review images.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| REVIEW-01 | P1 | Authorized customer creates supported rating/body/image review. | Correct product/SKU/customer relationship and visible review. |
|
||||
| REVIEW-02 | P1 | Admin responds to authorized regional review. | Persisted response/customer detail agree, no wrong variant association. |
|
||||
| REVIEW-03 | P1 | Rating min/max/outside range, missing/long/Unicode body. | Approved validation; no partial review. |
|
||||
| REVIEW-04 | P1 | Multi-SKU product and global product reviews. | Defined product-vs-SKU aggregation, no duplicate presentation. |
|
||||
| REVIEW-05 | P0 | U2 impersonates U1 or edits unrelated review. | Ownership/auth enforced. |
|
||||
| REVIEW-06 | P0 | B admin responds to A-only review/private target. | Approved regional permissions; no arbitrary ID mutation. |
|
||||
| REVIEW-07 | P1 | Unsupported/missing/deleted product and repeated review. | Approved eligibility/one-review policy; safe errors. |
|
||||
| REVIEW-08 | P0 | Bad/unclaimed/foreign image key on create/response. | No partial review/response or old-image deletion. |
|
||||
| REVIEW-09 | P1 | Pagination/sort/empty product, reply refresh. | Accurate count/order with no duplicate/missing review. |
|
||||
| REVIEW-10 | P1 | Text contains HTML/script/links. | Safely rendered; no executable content. |
|
||||
| REVIEW-11 | P1 | Timeout/concurrent create/response. | Defined final state; no hidden duplicate review/reply. |
|
||||
| REVIEW-12 | P2 | Image failure or long response/text scale. | Useful fallback and readable customer/admin layout. |
|
||||
|
||||
Policy checkpoints: whether purchase required, product/SKU identity, moderation, repetition, region visibility and edit/delete lifecycle. Mark BLOCKED/conditional until maintained behavior is approved.
|
||||
28
docs/test-cases/scheduled-slots.md
Normal file
28
docs/test-cases/scheduled-slots.md
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# Scheduled slots and capacity
|
||||
|
||||
Scope: admin slot CRUD/assignment/capacity, customer slot discovery/cart choices, server checkout validation. Use time-relative S1/S2 and deliberately invalid slots.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| SLOT-01 | P0 | Create active future A slot with P/G SKUs. | Correct assigned products, delivery/freeze instants and customer choices. |
|
||||
| SLOT-02 | P1 | Edit times, SKU/group assignments and active state. | Changes persist/publish; only intended memberships changed. |
|
||||
| SLOT-03 | P0 | Inactive/past-delivery/past-freeze slot offered through direct API. | Not selectable/orderable for new purchase. |
|
||||
| SLOT-04 | P0 | Freeze time passes after cart selection but before submit. | Server rejects stale selection; no order or consumed coupon. |
|
||||
| SLOT-05 | P0 | Mark full while customer has checkout open. | Refreshed UI blocks; stale direct order rejected without writes. |
|
||||
| SLOT-06 | P1 | Reopen capacity and retry. | Slot becomes usable; no stale full state permanently cached. |
|
||||
| SLOT-07 | P0 | A checkout sends B slot, missing slot or SKU absent from S1. | Region/existence/membership validation rejects. |
|
||||
| SLOT-08 | P0 | Regular order sends null slot; flash order supplies arbitrary slots. | Regular rejected; flash normalization follows flash contract. |
|
||||
| SLOT-09 | P1 | Freeze=now, delivery=now, freeze after delivery, midnight/IST dates. | Correct exact boundaries and invalid date-order rejection. |
|
||||
| SLOT-10 | P1 | Invalid timestamps/timezone offset, missing fields. | No invalid/past accidental slot; clear validation. |
|
||||
| SLOT-11 | P1 | Duplicate SKUs/groups, explicit plus grouped SKU. | Unique purchasable memberships. |
|
||||
| SLOT-12 | P0 | Admin A assigns B regional SKU/group; global SKU allowed. | Foreign IDs denied; global works without owning region. |
|
||||
| SLOT-13 | P1 | Selected S1 removed/closed while S2 valid. | Clear deterministic fallback/reselection; quantity preserved. |
|
||||
| SLOT-14 | P1 | All slots unavailable for a cart SKU. | Unavailable line identified/excluded; no phantom fee/charge. |
|
||||
| SLOT-15 | P1 | Simultaneous checkout near capacity/manual full toggle. | Record agreed capacity guarantee; no silent bypass of committed full state. |
|
||||
| SLOT-16 | P1 | Slot update fails during related snippet/group writes. | No partial slot state; retry coherent. |
|
||||
| SLOT-17 | P1 | Empty slot and slot with only hidden/deleted SKUs. | Intentional empty state; no invalid customer purchase. |
|
||||
| SLOT-18 | P1 | Historical slot soft removal/deactivation or expired time. | Existing order time/history preserved; only new purchase blocked. |
|
||||
| SLOT-19 | P2 | Many slots sorted across dates, picker refresh/scroll. | Stable chronological order and correct selected slot ID. |
|
||||
| SLOT-20 | P0 | Customer/anonymous/B admin attempts A slot mutation. | Proper server authorization; no relation writes. |
|
||||
|
||||
Policy: distinguish explicit full flag from any numeric capacity rules. Do not assume a maximum count not defined in the product contract.
|
||||
22
docs/test-cases/staff-authentication.md
Normal file
22
docs/test-cases/staff-authentication.md
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Staff and superadmin authentication
|
||||
|
||||
Scope: `admin.staffUser.login`, `superadmin.auth.login/me`, staff auth contexts and route guards. Fixtures: admin A/B, supported roles, superadmin.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| SAUTH-01 | P0 | Login regional staff on native/admin-web. | Correct identity, role and assigned region; scoped dashboard loads. |
|
||||
| SAUTH-02 | P0 | Login superadmin; open protected dashboard directly. | Correct superadmin session; authorized global configuration available. |
|
||||
| SAUTH-03 | P1 | Reload/cold-start, logout, login another region's staff. | Session persists only while valid; prior regional/private data cleared. |
|
||||
| SAUTH-04 | P0 | Invalid username/password, empty or malformed input. | No session; safe error; retry works. |
|
||||
| SAUTH-05 | P0 | Customer token on staff routes; staff token on superadmin routes. | Server denial; hidden navigation alone is not proof. |
|
||||
| SAUTH-06 | P0 | Staff removed/reassigned while old session is open. | Subsequent access reflects current identity/region, not stale JWT assignment. |
|
||||
| SAUTH-07 | P0 | Tampered JWT, role or region claims; expired token. | Rejected; no fallback to an arbitrary region. |
|
||||
| SAUTH-08 | P0 | Missing/deleted staff role or region reference. | Safe denial rather than global/unscoped access. |
|
||||
| SAUTH-09 | P1 | Browser storage corrupt/missing; native restoration incomplete. | Login recovery without crash or privileged transient render. |
|
||||
| SAUTH-10 | P1 | Slow/double login, logout during pending request. | No late response silently restores unwanted session. |
|
||||
| SAUTH-11 | P0 | Protected direct links/back history after logout. | APIs and content remain inaccessible. |
|
||||
| SAUTH-12 | P2 | Keyboard/password visibility toggle and accessible errors. | Password protected; input usable on each platform. |
|
||||
| SAUTH-13 | P1 | Same identity uses native/web simultaneously. | Region/role agreement; supported session behavior documented. |
|
||||
| SAUTH-14 | P0 | Login response/log inspection. | No password hashes or signing secrets exposed. |
|
||||
|
||||
See [authorization](authorization-api-contracts.md) for the complete role matrix.
|
||||
22
docs/test-cases/staff-management.md
Normal file
22
docs/test-cases/staff-management.md
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Staff management and roles
|
||||
|
||||
Scope: superadmin staff list/create/update/remove/roles and regional staff management APIs. No password values belong in run reports.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| STAFF-01 | P0 | Superadmin creates staff in A with supported role. | Exactly one staff identity; login scoped to A. |
|
||||
| STAFF-02 | P1 | Edit name/role/password; inspect list and login. | Changes persist; password omitted from public/list payloads. |
|
||||
| STAFF-03 | P0 | Reassign A staff to B, retry old session. | Current assignment used; A private data no longer accessible. |
|
||||
| STAFF-04 | P1 | Remove disposable staff, then use old login/token. | Removed identity cannot authenticate or mutate. |
|
||||
| STAFF-05 | P1 | Duplicate username and case/whitespace variants. | Agreed uniqueness; no half-created staff/user credential. |
|
||||
| STAFF-06 | P1 | Unknown role/region, zero/negative IDs, empty fields. | Validation before writes; existing staff unchanged. |
|
||||
| STAFF-07 | P0 | Regional admin attempts arbitrary B assignment/global role creation. | Cannot escape authorized administrative scope. |
|
||||
| STAFF-08 | P0 | Anonymous/customer calls staff CRUD or role mutation. | Denied without exposing staff credentials. |
|
||||
| STAFF-09 | P0 | Change protected account/self/last-superadmin identity where supported. | Approved protection enforced; no administrative lockout. |
|
||||
| STAFF-10 | P1 | Remove staff referenced by coupons/orders/notes. | Approved dependency/history policy; no orphan audit data. |
|
||||
| STAFF-11 | P1 | Simultaneous create same username or update/remove same staff. | Coherent single identity and clear conflicts. |
|
||||
| STAFF-12 | P1 | Save timeout after commit; inspect before retry. | No duplicate identity or silent password rollback. |
|
||||
| STAFF-13 | P1 | Roles list absent/empty or changes while form open. | Clear recoverable form; obsolete role submission rejected. |
|
||||
| STAFF-14 | P2 | Regional staff list with many A/B identities. | Correct scope, sort/filter and stable row identity. |
|
||||
|
||||
Policy checkpoint: exact per-role CRUD rights must be documented before marking permission cases PASS.
|
||||
28
docs/test-cases/uploads-images.md
Normal file
28
docs/test-cases/uploads-images.md
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# File uploads, images and asset lifecycle
|
||||
|
||||
Scope: common/user upload URL generation, authorized contexts, object storage, claiming references and replaced/deleted assets on profiles/products/tags/stores/banners/complaints. Use staging storage only.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| UPLOAD-01 | P1 | Generate permitted URL, upload valid image, save owner record. | Asset exists and is claimed exactly by intended entity; visible image. |
|
||||
| UPLOAD-02 | P1 | Multiple images/variants, replace one and retain owned keys. | Correct ordering/ownership; other images not removed. |
|
||||
| UPLOAD-03 | P1 | Supported MIME/extensions and platform image picker. | Uploaded content/reference coherent; cancellation makes no entity mutation. |
|
||||
| UPLOAD-04 | P0 | Unauthorized context or another user's/staff image key. | Ownership/scope denied before row changes. |
|
||||
| UPLOAD-05 | P1 | Missing/expired/forged signed URL or upload never completed. | Save fails clearly; no half-created entity or false image claim. |
|
||||
| UPLOAD-06 | P0 | Valid first image and invalid second image in product/tag/profile save. | Failure leaves no partial creation/update; old assets preserved. |
|
||||
| UPLOAD-07 | P1 | Re-send current entity's existing asset key on unrelated edit. | No reupload required; not falsely rejected as already claimed. |
|
||||
| UPLOAD-08 | P1 | Key vs full URL vs already-prefixed URL/query-string URL. | Supported normalization once; no double prefix/%3F malformed asset path. |
|
||||
| UPLOAD-09 | P0 | Path traversal/external arbitrary URL/unsupported scheme. | Cannot claim/delete another storage object or publish unsafe asset reference. |
|
||||
| UPLOAD-10 | P1 | Empty/oversized/corrupt/non-image content with image MIME. | Approved size/content validation; no broken published success. |
|
||||
| UPLOAD-11 | P1 | Concurrent claim of same pending key. | Defined single-owner/no theft; rejected entity not half-created. |
|
||||
| UPLOAD-12 | P1 | Replacement cleanup fails after successful save. | New asset persists; old cleanup retry/logging does not undo valid record. |
|
||||
| UPLOAD-13 | P1 | Delete entity whose asset key missing/malformed. | Defined safe delete; missing storage object not permanently blocking DB cleanup. |
|
||||
| UPLOAD-14 | P1 | Upload succeeds, form cancelled or save fails. | Unclaimed asset cleanup policy; no unrelated entity claims. |
|
||||
| UPLOAD-15 | P1 | Slow upload/offline/retry/background/rotation. | Progress/errors recover; no duplicate owner attachment. |
|
||||
| UPLOAD-16 | P2 | Browser CORS/signed headers and native content URI. | Supported platform transfer; no locally valid but server-unusable reference. |
|
||||
| UPLOAD-17 | P0 | Delete/reuse image shared by historical data or sibling variant. | No unintended image disappearance; ownership/reference policy enforced. |
|
||||
| UPLOAD-18 | P1 | Public fetch caching after image replacement. | Correct new image inside deadline, safe key/version behavior. |
|
||||
| UPLOAD-19 | P0 | Upload errors/logs expose signing key/credential. | Secrets never included in client/report logs. |
|
||||
| UPLOAD-20 | P1 | Batch URL generation fails midway. | Explicit outcome/pending cleanup; no falsely returned unusable URL list. |
|
||||
|
||||
Size limits/content sniffing and shared-reference retention must be specified before marking policy cases PASS.
|
||||
23
docs/test-cases/vendor-snippets.md
Normal file
23
docs/test-cases/vendor-snippets.md
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# Vendor snippets — conditional/legacy
|
||||
|
||||
**Status:** Existing routes remain, but prior product scope marked snippets out of current daily sanity. Execute only if operations restores support or approves security coverage. Do not mark unsupported UI paths PASS. Scope: admin snippet CRUD, fallback vendor page, public snippet order/slot reads and packaging.
|
||||
|
||||
| ID | Priority | Action / input | Expected result |
|
||||
|---|---|---|---|
|
||||
| VENDOR-01 | P1 | Create A slot-specific snippet for P only; order P+Q. | Vendor sees only authorized P lines, correct noncancelled slot quantities. |
|
||||
| VENDOR-02 | P1 | Permanent snippet chooses supported upcoming slot. | Correct slot metadata/selection and intended authorized lines. |
|
||||
| VENDOR-03 | P1 | Edit SKU set/expiry/code; reopen URL. | Updated authority/data; old link policy explicit. |
|
||||
| VENDOR-04 | P0 | Expired/deleted/missing code or wrong slot. | No private order read or packaging authority. |
|
||||
| VENDOR-05 | P0 | Unrelated order-item ID in packaging mutation. | Denied; snippet URL does not authorize arbitrary item IDs. |
|
||||
| VENDOR-06 | P0 | A snippet uses B SKU/group/slot or reads B order. | Regional association/isolation enforced. |
|
||||
| VENDOR-07 | P1 | Vendor packages/unpackages permitted item. | Same state in admin/customer where intended; other items unchanged. |
|
||||
| VENDOR-08 | P1 | Cancelled/delivered/past orders and empty slot. | Production-demand policy correct; no cancelled quantity counted. |
|
||||
| VENDOR-09 | P1 | Duplicate/empty SKUs, duplicate code and invalid expiry. | Validations/deduplication; no partial snippet. |
|
||||
| VENDOR-10 | P1 | Same SKU multiple orders/quantities/split groups. | Correct summed demand, distinct authorized order items. |
|
||||
| VENDOR-11 | P1 | Permanent mode missing slot/metadata. | Useful supported selection/error, not endless loader or crash. |
|
||||
| VENDOR-12 | P0 | Anonymous access without valid snippet authority. | No arbitrary vendor data or mutation exposure. |
|
||||
| VENDOR-13 | P1 | Packaging races admin cancellation/delivery. | Legal coherent final state; cancelled order not revived. |
|
||||
| VENDOR-14 | P1 | Delete/update fails midway or request retried. | No partial authority expansion or duplicate relation. |
|
||||
| VENDOR-15 | P2 | Mobile vendor page refresh/back, long demand list. | Correct saved state, readable totals and no stale cross-slot results. |
|
||||
|
||||
Policy checkpoint: snippet credential/expiry enforcement, PII exposure, permanent-code behavior and legal packaging transitions. Security probes require staging fixtures even though routes are public.
|
||||
Loading…
Add table
Reference in a new issue