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

2.8 KiB

Order cancellation and group-aware coupon restoration

Scope: customer/admin cancellation, reason/actor/status, group usages, COD-only compensation policy and upcoming/vendor views. There is no online payment and no refund record.

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 cancellation/usage restoration 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 usage restoration or compensation event.
CANCEL-12 P0 Cancellation races packaging/delivery. Coherent legal transition, no final contradictory statuses.
CANCEL-13 P1 Cancel after price/coupon/config edits. Any approved compensation uses the stored charge, not the current catalog; no online refund record is created.
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 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.

Cancellation is COD-only: there is no online payment and no refund record. Order-group IDs and usage row counts are required evidence.