Test Cases: CRM
| Module | CORE-09 | URD | CRM URD |
|---|
1. Coverage Summary
| Area | URD reqs | Test cases | Covered |
|---|---|---|---|
Customer Profiles (CUS) | 7 | 8 | ⚠️ |
Loyalty Points (PNT) | 5 | 5 | ✅ |
Newsletter Subscribers (SUB) | 5 | 5 | ✅ |
Sales Inquiries (INQ) | 4 | 5 | ✅ |
⚠️
URD-CUS-007(customer-to-user promotion) is In-progress — its test case is written but not yet passing. See the Traceability section.
2. Test Cases
TC-<AREA>-NNNlines up withURD-<AREA>-NNN. Priority = P1 (critical) / P2 (major) / P3 (minor).
Customer Profiles
| TC ID | URD ref | Scenario | Steps | Expected | P |
|---|---|---|---|---|---|
| TC-CUS-001 | URD-CUS-001 | Create customer with required fields | 1. Open new-customer form 2. Enter name, one phone, one email 3. Save | Customer is created and scoped to the brand | P1 |
| TC-CUS-002 | URD-CUS-001 | Reject missing name | 1. Open form 2. Leave name blank 3. Save | Creation rejected; name is required | P1 |
| TC-CUS-003 | URD-CUS-002 | Brand scoping on create | 1. Staff of Brand A creates a customer | Customer belongs to Brand A only | P1 |
| TC-CUS-004 | URD-CUS-003 | Update profile | 1. Open existing customer 2. Change email 3. Save | Email updated; other fields unchanged | P1 |
| TC-CUS-005 | URD-CUS-004 | Soft-delete preserves history | 1. Customer has linked orders 2. Owner soft-deletes | Customer leaves active list; record and orders remain | P1 |
| TC-CUS-006 | URD-CUS-005 | Brand isolation on read | 1. Brand B owner searches for a Brand A customer | No result; data is isolated by brand | P1 |
| TC-CUS-007 | URD-CUS-006 | Attach customer at checkout | 1. Cashier selects a customer for the open order | Customer is linked to the order | P2 |
| TC-CUS-008 | URD-CUS-007 | Promote customer to user | 1. Owner promotes a profile to a sign-in account | Account gains credentials; conflicts are detected | P2 |
Loyalty Points
| TC ID | URD ref | Scenario | Steps | Expected | P |
|---|---|---|---|---|---|
| TC-PNT-001 | URD-PNT-001 | Earn points on completion | 1. Customer on order; rate set 2. Order completes payment | Points added to balance | P1 |
| TC-PNT-002 | URD-PNT-002 | Award = total × rate | 1. Order total 100,000; rate 0.01 2. Order completes | 1,000 points awarded | P2 |
| TC-PNT-003 | URD-PNT-003 | Running balance | 1. Customer earns on two orders | Balance equals the sum of both awards | P2 |
| TC-PNT-004 | URD-PNT-004 | Idempotent award | 1. Payment-success event for one order is redelivered | Points awarded once only; balance unchanged on retry | P1 |
| TC-PNT-005 | URD-PNT-005 | No-award guards | 1a. No customer attached, or 1b. rate zero/unset 2. Order completes | No points awarded | P2 |
Newsletter Subscribers
| TC ID | URD ref | Scenario | Steps | Expected | P |
|---|---|---|---|---|---|
| TC-SUB-001 | URD-SUB-001 | New subscribe | 1. New email subscribes with topics + locale | Subscriber created with an unsubscribe token | P2 |
| TC-SUB-002 | URD-SUB-002 | Email uniqueness | 1. Subscribe with an email already registered | No duplicate row; existing record kept | P2 |
| TC-SUB-003 | URD-SUB-003 | One-click unsubscribe | 1. Click the token link | Subscriber is deactivated | P2 |
| TC-SUB-004 | URD-SUB-004 | Resubscribe reactivates | 1. Deactivated subscriber subscribes again | Subscriber is reactivated (idempotent) | P2 |
| TC-SUB-005 | URD-SUB-005 | Statistics | 1. Open subscriber statistics | Totals, monthly-new, and by-status counts shown | P3 |
Sales Inquiries
| TC ID | URD ref | Scenario | Steps | Expected | P |
|---|---|---|---|---|---|
| TC-INQ-001 | URD-INQ-001 | Capture inquiry | 1. Visitor submits name, business info, message | Inquiry stored with status NEW | P2 |
| TC-INQ-002 | URD-INQ-002 | Real-time admin notice | 1. Visitor submits an inquiry | Admin observation room receives a live notification | P2 |
| TC-INQ-003 | URD-INQ-003 | Assign and reply | 1. Sales assigns to self 2. Replies | Assignee, reply author, and timestamp recorded | P2 |
| TC-INQ-004 | URD-INQ-004 | Convert | 1. Sales marks inquiry converted | Outcome and conversion timestamp recorded | P2 |
| TC-INQ-005 | URD-INQ-004 | Lost with reason | 1. Sales marks inquiry lost with a reason | Status lost; reason recorded | P3 |
QE Assessment Finding — promotion & order-link gaps
Source: developer docs review of @nx/identity, @nx/sale.
- Customer-to-user promotion (URD-CUS-007 / TC-CUS-008) is In-progress — the promotion path is not yet shipped, so TC-CUS-008 is written but not expected to pass.
- Customer-order link verify — confirm the sale-order carries the customer reference end to end before treating TC-CUS-007 and the points flow as fully covered; loyalty awards skip when no customer is attached.
- Conversion rate source — points use a per-merchant rate read from configuration that defaults to zero; TC-PNT-001/002 require the rate to be set for the test merchant.
3. Traceability
Every Must requirement must map to ≥1 test case. Flag gaps explicitly.
| URD requirement | Test case(s) | Status |
|---|---|---|
| URD-CUS-001 | TC-CUS-001, TC-CUS-002 | ✅ Covered |
| URD-CUS-002 | TC-CUS-003 | ✅ Covered |
| URD-CUS-003 | TC-CUS-004 | ✅ Covered |
| URD-CUS-004 | TC-CUS-005 | ✅ Covered |
| URD-CUS-005 | TC-CUS-006 | ✅ Covered |
| URD-CUS-006 | TC-CUS-007 | ✅ Covered |
| URD-CUS-007 | TC-CUS-008 | ⚠️ In-progress (promotion not yet shipped) |
| URD-PNT-001 | TC-PNT-001 | ✅ Covered |
| URD-PNT-002 | TC-PNT-002 | ✅ Covered |
| URD-PNT-003 | TC-PNT-003 | ✅ Covered |
| URD-PNT-004 | TC-PNT-004 | ✅ Covered |
| URD-PNT-005 | TC-PNT-005 | ✅ Covered |
| URD-SUB-001 | TC-SUB-001 | ✅ Covered |
| URD-SUB-002 | TC-SUB-002 | ✅ Covered |
| URD-SUB-003 | TC-SUB-003 | ✅ Covered |
| URD-SUB-004 | TC-SUB-004 | ✅ Covered |
| URD-SUB-005 | TC-SUB-005 | ✅ Covered |
| URD-INQ-001 | TC-INQ-001 | ✅ Covered |
| URD-INQ-002 | TC-INQ-002 | ✅ Covered |
| URD-INQ-003 | TC-INQ-003 | ✅ Covered |
| URD-INQ-004 | TC-INQ-004, TC-INQ-005 | ✅ Covered |
All four Must requirements (
URD-CUS-001–004) are covered. The only open item isURD-CUS-007, a Could-priority feature still In-progress.