Skip to content

Test Cases: Commerce

ModuleCORE-03URDCommerce URD

1. Coverage Summary

AreaURD reqsTest casesCovered
Organization (ORG)1317
Merchant (MER)1517
Sale Channels (SC)78
Categories (CAT)45
Deletion Policy (DEL)43
Configuration (CFG)30⚠️
Access (ACC)1213

Configuration (CFG) requirements are all Should priority and currently lack dedicated test cases — flagged in §3.

2. Test Cases

TC-<AREA>-NNN lines up with URD-<AREA>-NNN. Priority = P1 (critical) / P2 (major) / P3 (minor).

2.1 Onboarding

TC IDURD refScenarioStepsExpectedP
TC-ORG-001URD-ORG-001, URD-ORG-002, URD-MER-001, URD-SC-001Happy-path onboarding1. Authenticated user with no org. 2. Complete onboarding with valid name + slugOrganization (Activated) + default merchant + default channel created; identifiers auto-generated for all threeP1
TC-ORG-002URD-ORG-003Creator becomes Owner1. New user completes onboardingUser assigned as Owner with full control over the organization and its merchantsP1
TC-ORG-003URD-ORG-004Onboarding requires name1. Attempt onboarding with no business nameRejected; no org/merchant/channel createdP1
TC-ORG-004URD-ORG-001, URD-ORG-002Atomic rollback1. Org created. 2. Default merchant/channel creation failsWhole operation rolled back; nothing persistedP1
TC-ORG-005URD-ORG-004Slug auto-generated1. Onboard with name but no slugSlug generated from name and is uniqueP2
TC-ORG-006URD-ORG-001One org per user1. User already has an org. 2. Attempt onboarding againRejected; error indicates org already existsP2

2.2 Organization

TC IDURD refScenarioStepsExpectedP
TC-ORG-007URD-ORG-004Create with optional fields empty1. Create org with name + slug onlyCreated; optional fields (tax, registration, contact, address) nullP1
TC-ORG-008URD-ORG-004Multilingual name1. Provide name in EN + VIAll language versions stored and retrievableP1
TC-ORG-009URD-ORG-005System identifier1. Create orgUnique system identifier assigned, not user-editableP1
TC-ORG-010URD-ORG-007View details1. Owner/Admin views orgAll info returned incl. status and identifierP1
TC-ORG-011URD-ORG-007Update profile1. Owner updates tax/contact/addressUpdated; modifier tracked; merchants unaffectedP1
TC-ORG-012URD-ORG-007Reject empty name1. Owner sets name emptyRejected; original data preservedP2
TC-ORG-013URD-ORG-006Lookup by ID and slug1. Search by ID. 2. Search by slugOrg returned in both casesP1
TC-ORG-014URD-ORG-006Lookup not found1. Search by non-existent IDNot foundP2
TC-ORG-015URD-ORG-005Slug global uniqueness1. Org uses slug "x". 2. Another user tries "x"Rejected; slug in useP1
TC-ORG-016URD-ORG-010Deactivate1. Owner deactivates active orgStatus Deactivated; data preserved; reversibleP2
TC-ORG-017URD-ORG-012Archive1. Owner archives orgStatus Archived; data preserved; hidden from active listsP2
TC-ORG-018URD-ORG-011Headquarter merchant1. Owner designates a HQ merchantPrimary merchant referenced on orgP2
TC-ORG-019URD-ORG-013Child organization1. Owner creates child org under parentChild references parent; parent shows childrenP3

2.3 Merchant

TC IDURD refScenarioStepsExpectedP
TC-MER-001URD-MER-001Default merchant on onboarding1. Onboarding completesDefault merchant Activated with a default channel; identifiers generatedP1
TC-MER-002URD-MER-002Create additional merchant1. Owner creates merchant with name/type/currencyCreated and linked; org now has 2 merchantsP1
TC-MER-003URD-MER-002Reject missing name1. Create merchant with no nameRejected; name requiredP2
TC-MER-004URD-MER-003Batch create1. Owner batch-creates 3 merchantsAll 3 created with unique identifiers/slugs, same orgP1
TC-MER-005URD-MER-004, URD-CAT-001, URD-SC-002Aggregate create1. Create merchant with 2 categories + 2 channelsAll created and linked atomically; identifiers generatedP1
TC-MER-006URD-MER-004Aggregate create rollback1. Aggregate create with invalid categoryWhole operation rejected; nothing createdP1
TC-MER-007URD-MER-005Slug per-org uniqueness1. Two different orgs both create slug "store-a"Both succeed; uniqueness scoped to orgP1
TC-MER-008URD-MER-005Duplicate slug in same org1. Create second merchant with existing slug in same orgRejected; slug in use within orgP1
TC-MER-009URD-MER-006View merchant1. Owner/Admin views merchantName/type/currency/status returned; channels & categories accessibleP1
TC-MER-010URD-MER-007Update merchant1. Owner updates name + currencyUpdated; modifier tracked; channels/categories unaffectedP1
TC-MER-011URD-MER-008, URD-CAT-002, URD-CAT-003, URD-SC-003Aggregate update mixed ops1. Rename a category. 2. Add a category. 3. Delete a channel. 4. Add a channelAll applied atomicallyP1
TC-MER-012URD-MER-008Smart-update key convention1. Child {id} only. 2. ChildFirst deleted; second updatedP1
TC-MER-013URD-MER-015Explicit delete flag1. Aggregate update with explicit delete flag on a categoryCategory deleted; sending ID without delete flag does NOT deleteP1
TC-MER-014URD-MER-008Aggregate update rollback1. Valid name change + invalid channelWhole update fails; original data preservedP1
TC-MER-015URD-MER-009Lookup by ID and slug1. Search by ID. 2. Search by slugMerchant returned in both casesP1
TC-MER-016URD-MER-012Deactivate / reactivate1. Deactivate then reactivateStatus transitions; channels/categories intactP2
TC-MER-017URD-MER-014Merchant hierarchy1. Create child merchant under parentChild references parent; parent shows childrenP3

2.4 Sale Channels

TC IDURD refScenarioStepsExpectedP
TC-SC-001URD-SC-001Default channel on onboarding1. Onboarding completesDefault channel Activated under default merchant; identifier generatedP1
TC-SC-002URD-SC-002Channels via aggregate create1. Create merchant with 2 channelsBoth created/linked; accessible on merchantP1
TC-SC-003URD-SC-003Batch-add to existing merchant1. Add multiple channels to an existing merchantAll created and linkedP1
TC-SC-004URD-SC-002Rename via aggregate update1. Rename one channelRenamed; other channels unchangedP2
TC-SC-005URD-SC-004Duplicate slug in merchant1. Create channel with existing slug in same merchantRejected; slug in use within merchantP1
TC-SC-006URD-SC-004Slug per-merchant uniqueness1. Two merchants both use channel slug "counter"Both succeed; uniqueness scoped to merchantP2
TC-SC-007URD-SC-005Channel identifier1. Create channelUnique system identifier, not editableP2
TC-SC-008URD-SC-006Channel hierarchy1. Create child channel under parentChild references parent; parent shows childrenP3

2.5 Categories

TC IDURD refScenarioStepsExpectedP
TC-CAT-001URD-CAT-001Categories via aggregate create1. Create merchant with 2 categoriesBoth created/linked; accessible on merchantP1
TC-CAT-002URD-CAT-002Rename category1. Aggregate update renames a categoryRenamed; products under it unaffectedP1
TC-CAT-003URD-CAT-003Delete category1. Aggregate update deletes a categorySoft-deleted; other categories unchangedP1
TC-CAT-004URD-CAT-004Mark add-on1. Mark a category as add-onFlagged; its products treated as add-onsP2
TC-CAT-005URD-CAT-004Un-mark add-on1. Remove add-on flagNo longer add-on; products revertP2

2.6 Deletion Policy

TC IDURD refScenarioStepsExpectedP
TC-DEL-001URD-DEL-001, URD-DEL-004View / update policy1. Owner views then updates deletion policyCurrent values returned; update persistedP2
TC-DEL-002URD-DEL-002Strict category deletion1. strictCategoryDeletion true. 2. Delete category with productsBlockedP2
TC-DEL-003URD-DEL-003Cascade product deletion1. cascadeProductDeletion true. 2. Delete categoryIts products also deletedP2

2.7 Access

TC IDURD refScenarioStepsExpectedP
TC-ACC-001URD-ACC-001Org-level assignment1. Owner assigns employee at org levelEmployee can access all merchants under the orgP1
TC-ACC-002URD-ACC-002Merchant-level assignment1. Owner assigns employee to Merchant A onlyEmployee accesses A, not BP1
TC-ACC-003URD-ACC-002Multi-merchant assignment1. Employee assigned to A and CAccesses A and C, not BP1
TC-ACC-004URD-ACC-003Multi-org access1. User granted access to Orgs X and YSees data from both orgsP1
TC-ACC-005URD-ACC-004Owner data isolation1. Owner A requests dataOnly Org X visible; Org Y hiddenP1
TC-ACC-006URD-ACC-005Role-filtered list & count1. Admin/Owner/Employee each request list and countAdmin all; Owner own; Employee assigned; count matches listP1
TC-ACC-007URD-ACC-006Owner org capabilities1. Owner creates/views/updates orgAll succeed; changes trackedP1
TC-ACC-008URD-ACC-007Owner merchant capabilities1. Owner creates, updates, deactivates merchantAll succeed; status transitionsP1
TC-ACC-009URD-ACC-008Owner channel/category management1. Owner creates/updates/deletes channels & categories via aggregateAll reflected on merchantP1
TC-ACC-010URD-ACC-009Assign employee to merchant1. Owner assigns employee to a merchantMapping created; employee scoped to that merchantP1
TC-ACC-011URD-ACC-010Employee merchant list1. Employee assigned to X requests listOnly X returnedP1
TC-ACC-012URD-ACC-011Employee denied unassigned1. Employee accesses Merchant YAccess deniedP1
TC-ACC-013URD-ACC-012Unrecognized role1. User with unhandled role requests listDenied (403 or explicit insufficient-permission) — never a silent empty listP1

QE Assessment Finding

The role-based switch default branch in the organizer/merchant controllers historically returned empty data with no error — indistinguishable from "no data". TC-ACC-013 guards against this silent failure.

QE Assessment Finding

The aggregate-update "single-key means delete" convention (a child sent as { id } only) is brittle: a client intending to leave a record unchanged would trigger a delete. TC-MER-013 mandates an explicit delete flag instead.

3. Traceability

Every Must requirement maps to ≥1 test case. Gaps are flagged.

URD requirementTest case(s)Status
URD-ORG-001TC-ORG-001, TC-ORG-004, TC-ORG-006✅ Covered
URD-ORG-002TC-ORG-001, TC-ORG-004✅ Covered
URD-ORG-003TC-ORG-002✅ Covered
URD-ORG-004TC-ORG-003, TC-ORG-005, TC-ORG-007, TC-ORG-008, TC-ORG-012✅ Covered
URD-ORG-005TC-ORG-009, TC-ORG-015✅ Covered
URD-ORG-006TC-ORG-013, TC-ORG-014✅ Covered
URD-ORG-007TC-ORG-010, TC-ORG-011✅ Covered
URD-ORG-008⚠️ Uncovered (file attachments)
URD-ORG-009TC-ACC-006✅ Covered
URD-ORG-010TC-ORG-016✅ Covered
URD-ORG-011TC-ORG-018✅ Covered
URD-ORG-012TC-ORG-017✅ Covered
URD-ORG-013TC-ORG-019✅ Covered
URD-MER-001TC-MER-001, TC-ORG-001✅ Covered
URD-MER-002TC-MER-002, TC-MER-003✅ Covered
URD-MER-003TC-MER-004✅ Covered
URD-MER-004TC-MER-005, TC-MER-006✅ Covered
URD-MER-005TC-MER-007, TC-MER-008✅ Covered
URD-MER-006TC-MER-009✅ Covered
URD-MER-007TC-MER-010✅ Covered
URD-MER-008TC-MER-011, TC-MER-012, TC-MER-014✅ Covered
URD-MER-009TC-MER-015✅ Covered
URD-MER-010TC-ACC-006, TC-ACC-011✅ Covered
URD-MER-011TC-ACC-006✅ Covered
URD-MER-012TC-MER-016✅ Covered
URD-MER-013TC-ORG-017 (shared lifecycle)✅ Covered
URD-MER-014TC-MER-017✅ Covered
URD-MER-015TC-MER-013✅ Covered
URD-SC-001TC-SC-001, TC-ORG-001✅ Covered
URD-SC-002TC-SC-002, TC-SC-004✅ Covered
URD-SC-003TC-SC-003✅ Covered
URD-SC-004TC-SC-005, TC-SC-006✅ Covered
URD-SC-005TC-SC-007✅ Covered
URD-SC-006TC-SC-008✅ Covered
URD-SC-007TC-MER-011 (channel delete)✅ Covered
URD-CAT-001TC-CAT-001, TC-MER-005✅ Covered
URD-CAT-002TC-CAT-002✅ Covered
URD-CAT-003TC-CAT-003✅ Covered
URD-CAT-004TC-CAT-004, TC-CAT-005✅ Covered
URD-DEL-001TC-DEL-001✅ Covered
URD-DEL-002TC-DEL-002✅ Covered
URD-DEL-003TC-DEL-003✅ Covered
URD-DEL-004TC-DEL-001✅ Covered
URD-CFG-001⚠️ Uncovered (Should)
URD-CFG-002⚠️ Uncovered (Should)
URD-CFG-003⚠️ Uncovered (Should)
URD-ACC-001TC-ACC-001, TC-ACC-002✅ Covered
URD-ACC-002TC-ACC-002, TC-ACC-003✅ Covered
URD-ACC-003TC-ACC-004✅ Covered
URD-ACC-004TC-ACC-005✅ Covered
URD-ACC-005TC-ACC-006, TC-ACC-013✅ Covered
URD-ACC-006TC-ACC-007✅ Covered
URD-ACC-007TC-ACC-008✅ Covered
URD-ACC-008TC-ACC-009✅ Covered
URD-ACC-009TC-ACC-010✅ Covered
URD-ACC-010TC-ACC-011✅ Covered
URD-ACC-011TC-ACC-012✅ Covered
URD-ACC-012TC-ACC-013✅ Covered

Gaps: URD-ORG-008 (file attachments, Must) and URD-CFG-001..003 (Should) have no dedicated test cases yet.

Proprietary and Confidential. Unauthorized copying, distribution, or use of this software is strictly prohibited.