Use this page for technical screen behavior, source references, and active Playwright coverage.
Vendor management with CRUD operations, filters, ratings, and vendor directory.
Page: Vendors.razor
Route: /vendors
Menu Position: 5 (Vendors)
Vendor management with CRUD operations, filters, ratings, and vendor directory.
| ID | Section | Action | Expected Outcome | Controls Affected |
|---|---|---|---|---|
| UC-VEND-001 | Header | Load page | Title "Vendor Management - [BusinessName]", h2 shows "Vendor Management" with truck icon | PageTitle, h2 |
| UC-VEND-002 | Header | No business selected | Alert "Please select a business to view vendors" | alert alert-info |
| UC-VEND-003 | Actions | Click "Add Vendor" (top right) | Modal opens with title "Add New Vendor", empty form | vendorModal |
| UC-VEND-004 | Actions | Click "Add Vendor" (button bar) | Same - modal opens | vendorModal |
| ID | Section | Action | Expected Outcome | Controls Affected |
|---|---|---|---|---|
| UC-VEND-005 | Filter | View filter row | 4 dropdown filters: Type, Status, Rating, Location | 4 select elements |
| UC-VEND-006 | Filter | Select "Supplier" from Type | Shows only Supplier type vendors | Type select, table rows |
| UC-VEND-007 | Filter | Select "Manufacturer" from Type | Shows only Manufacturer type vendors | Type select, table rows |
| UC-VEND-008 | Filter | Select "Distributor" from Type | Shows only Distributor type vendors | Type select, table rows |
| UC-VEND-009 | Filter | Select "Service Provider" from Type | Shows only Service Provider type vendors | Type select, table rows |
| UC-VEND-010 | Filter | Select "Active" from Status | Shows only active vendors | Status select, table rows |
| UC-VEND-011 | Filter | Select "Inactive" from Status | Shows only inactive vendors | Status select, table rows |
| UC-VEND-012 | Filter | Select "5 Star (Excellent)" | Shows vendors with rating = 5.0 | Rating select, table rows |
| UC-VEND-013 | Filter | Select "4+ Star (Very Good)" | Shows vendors with rating >= 4.0 | Rating select, table rows |
| UC-VEND-014 | Filter | Select "3+ Star (Good)" | Shows vendors with rating >= 3.0 | Rating select, table rows |
| UC-VEND-015 | Filter | Select "Below 3 Star" | Shows vendors with rating < 3.0 | Rating select, table rows |
| UC-VEND-016 | Filter | Select location (e.g., "Mumbai") | Shows vendors from Mumbai only | Location select, table rows |
| UC-VEND-017 | Filter | Location options | Major Indian cities | Location select options |
| ID | Section | Action | Expected Outcome | Controls Affected |
|---|---|---|---|---|
| UC-VEND-018 | Summary | Total count | Shows "Total: X items" (total vendors) | summary-count |
| UC-VEND-019 | Summary | Filtered count | Shows "Filtered: X items" (after filter applied) | summary-filtered |
| UC-VEND-020 | Summary | Average Rating | Shows "Avg Rating: X.X" (average of all ratings) | summary-rating |
| UC-VEND-021 | Summary | Active count | Shows "Active: X vendors" (count of active) | summary-active |
| UC-VEND-022 | Summary | Apply filter | All summary stats recalculate for filtered data | All 4 summary values |
| ID | Section | Action | Expected Outcome | Controls Affected |
|---|---|---|---|---|
| UC-VEND-023 | Table | View table headers | 8 columns: Code, Vendor Name, Contact, Phone, Type, Rating, Status, Actions | thead th × 8 |
| UC-VEND-024 | Table | View vendor row | Shows: bold code, name+email, contact person, phone, type badge, star rating, status badge, 3 buttons | tr cells |
| UC-VEND-025 | Table | Code column | Bold vendor code | strong |
| UC-VEND-026 | Table | Vendor Name column | Two lines: Vendor Name, Email (muted) | d-flex flex-column |
| UC-VEND-027 | Table | Contact column | Contact person name, or "Not Specified" italic | Cell text |
| UC-VEND-028 | Table | Phone column | Phone number, or "Not Specified" italic | Cell text |
| UC-VEND-029 | Table | Type = Supplier | Info badge "Supplier" | badge bg-info |
| UC-VEND-030 | Table | Type = Manufacturer | Info badge "Manufacturer" | badge bg-info |
| UC-VEND-031 | Table | Type = Distributor | Info badge "Distributor" | badge bg-info |
| UC-VEND-032 | Table | Type = Not Specified | Italic "Not Specified" text | text-muted fst-italic |
| UC-VEND-033 | Table | Rating display | Star icons (★ filled, ☆ empty) + numeric | Rating cell |
| UC-VEND-034 | Table | Rating 4+ stars | Shows filled stars appropriately | Star rating display |
| UC-VEND-035 | Table | Rating 0.0 | Shows "☆☆☆☆☆ 0.0" all empty stars | 5 empty stars |
| UC-VEND-036 | Table | Status = Active | Green badge "Active" | badge bg-success |
| UC-VEND-037 | Table | Status = Inactive | Gray badge "Inactive" | badge bg-secondary |
| UC-VEND-038 | Table | No vendors | Empty state with search icon, "No vendors found", "Try adjusting your filters" | Empty state UI |
| ID | Section | Action | Expected Outcome | Controls Affected |
|---|---|---|---|---|
| UC-VEND-039 | Actions | Click "View" | Vendor details view/modal opens | View modal |
| UC-VEND-040 | Actions | Click "Edit" | Edit modal opens with vendor data pre-filled | Edit modal |
| UC-VEND-041 | Actions | Click "Delete" | Confirmation prompt, then vendor deleted | Confirm dialog, table update |
| ID | Section | Action | Expected Outcome | Controls Affected |
|---|---|---|---|---|
| UC-VEND-042 | Modal | View modal fields | Fields: Vendor Code (auto-gen), Vendor Name*, Contact Person, Phone, Email, Vendor Type | 6 form fields |
| UC-VEND-043 | Modal | Vendor Code | Auto-generated if empty, placeholder text | vendor-code-input |
| UC-VEND-044 | Modal | Type dropdown | Options: Supplier, Manufacturer, Distributor, Service Provider | InputSelect |
| UC-VEND-045 | Modal | Submit without name | Validation error for required Vendor Name | ValidationMessage |
| UC-VEND-046 | Modal | Email validation | Validates email format on blur | vendor-email-input |
| UC-VEND-047 | Modal | Validation errors | Red alert box with error list | alert alert-danger |
| UC-VEND-048 | Modal | Validation warnings | Yellow alert box with warning list | alert alert-warning |
| UC-VEND-049 | Modal | Validating state | Save button disabled, shows "Validating" with spinner | Button state |
| UC-VEND-050 | Modal | Save successfully | Spinner, vendor saved, modal closes, table refreshes | Modal close, table update |
| ID | Validation | Requirement |
|---|---|---|
| UC-VEND-051 | Vendor Count | Must show vendors when data exists |
| UC-VEND-052 | Average Rating | Average of all vendor ratings |
| UC-VEND-053 | Active Count | Count of active vendors |
| UC-VEND-054 | Type Distribution | Correct vendor type badges |
| UC-VEND-055 | Rating Range | 0.0 to 5.0 range |
| Test Class | Test Count | Coverage Areas | Related Use Cases |
|---|---|---|---|
VendorCalculationTests |
53 | Rating filters, average calculations, star display, type validation, summary stats | UC-VEND-006 to UC-VEND-015, UC-VEND-018 to UC-VEND-022, UC-VEND-029 to UC-VEND-037, UC-VEND-043 |
Location: Rabbit.Accounts.Tests/Vendors/VendorCalculationTests.cs
Test Categories:
Rating Filter Categories:
Total Use Cases: 55