Comprehensive test suite for verifying the Jinja2 migration of admin vendor and user pages
Test 1: Vendors List Page (adminVendors)
High Priority
Tests the new vendor LIST functionality. This is a NEW function added to vendors.js alongside the existing vendorCreation() function.
๐ API Endpoints to Check:
GET/api/v1/admin/vendors
GET/api/v1/admin/vendors/stats
DELETE/api/v1/admin/vendors/{code}
โ
Expected Result:
- NEW
adminVendors() function works correctly
- Uses
ApiClient (uppercase), not apiClient
- Uses
Logger.info() for logging
- Uses
Utils.showToast() for notifications
- Page matches dashboard styling exactly
Test 2: Vendor Edit Page (adminVendorEdit)
High Priority
Tests the UPDATED vendor edit functionality. The old vendor-edit.js has been updated to use NEW patterns (ApiClient, Logger, no Auth checks).
๐ API Endpoints to Check:
GET/api/v1/admin/vendors/{code}
PUT/api/v1/admin/vendors/{code}
PUT/api/v1/admin/vendors/{code}/verification
PUT/api/v1/admin/vendors/{code}/status
โ
Expected Result:
- OLD patterns removed:
apiClient, Auth checks
- NEW patterns used:
ApiClient, Logger, Utils
- Tailwind styling matches dashboard
- Simple confirms instead of complex modals
- Two-column form layout works
Test 3: Users Page (adminUsers)
Medium Priority
Tests the NEW users page created from scratch. Should follow the exact same pattern as vendors list.
๐ API Endpoints to Check:
GET/api/v1/admin/users
GET/api/v1/admin/users/stats
PUT/api/v1/admin/users/{id}/status
โ
Expected Result:
- NEW
adminUsers() function works
- Follows same pattern as vendors list
- Uses ApiClient, Logger, Utils
- Matches dashboard styling
- Role-based badge colors work
Test 4: Cross-Page Consistency
Verify that all pages maintain consistent styling and behavior.
Test 5: Backend Routes
Verify that all backend routes are properly configured.