# Quick Testing Guide - Lookup Management Feature ## Prerequisites 1. Database migration applied: `ConvertEnumsToLookupTables` 2. Application built successfully 3. Seed data loaded (via Platform Management > Seed Data) ## 5-Minute Quick Test ### Test 1: View Existing Lookups (2 minutes) 1. Start the application: `cd src/PowderCoating.Web && dotnet run` 2. Navigate to: `https://localhost:58461` 3. Login as SuperAdmin: `superadmin@powdercoating.com` / `SuperAdmin123!` 4. Click: **Company Settings** (in left sidebar) 5. Click: **Data Lookups** tab 6. **Expected**: See 3 sub-tabs: Job Statuses, Job Priorities, Quote Statuses 7. **Verify**: Job Statuses shows 16 default statuses with color badges 8. **Verify**: Usage counts display (e.g., "5 jobs") ### Test 2: Create Custom Lookup (1 minute) 1. On Job Statuses sub-tab, click: **Add Job Status** 2. Enter code: `TEST_STATUS` 3. Enter display name: `Test Status` 4. **Expected**: Success toast notification 5. **Verify**: New status appears in table at bottom ### Test 3: Edit Custom Lookup (1 minute) 1. Find the "Test Status" row 2. Click: **Edit** button (pencil icon) 3. Change display name to: `My Custom Status` 4. **Expected**: Success toast notification 5. **Verify**: Table refreshes with new name ### Test 4: Delete Custom Lookup (1 minute) 1. Find the "My Custom Status" row 2. Click: **Delete** button (trash icon) 3. Confirm deletion 4. **Expected**: Success toast notification 5. **Verify**: Status removed from table ### Test 5: Verify Jobs Use Lookups (30 seconds) 1. Navigate to: **Jobs** > **Create New Job** 2. **Verify**: Status dropdown shows all statuses (including any custom ones) 3. **Verify**: Priority dropdown shows all priorities 4. Create a job and **verify** it saves successfully ## System Protection Tests ### Test 6: Try to Delete System-Defined Status 1. Go to: Company Settings > Data Lookups > Job Statuses 2. Find "Pending" status (marked with [System] badge) 3. **Verify**: Delete button is DISABLED with tooltip "System-defined" ### Test 7: Try to Delete In-Use Status 1. Create a job with status "In Preparation" 2. Go to: Company Settings > Data Lookups > Job Statuses 3. Try to delete "In Preparation" status 4. **Expected**: Error message "Status is in use and cannot be deleted" ## Visual Verification ### Color Badges - ✅ Statuses display with colored badges (primary, success, warning, danger, etc.) - ✅ Badge colors match across Jobs Index and Company Settings ### Usage Counts - ✅ Each lookup shows accurate count (e.g., "12 jobs") - ✅ Counts update after creating/deleting jobs ### Responsive Design - ✅ Tables display correctly on desktop - ✅ Tables scroll horizontally on mobile if needed ## Troubleshooting ### Issue: "No job statuses found" **Solution**: Run seed data via Platform Management > Seed Data ### Issue: Dropdowns empty in Jobs/Quotes **Solution**: Check browser console for errors; verify migration applied ### Issue: Delete button not working **Solution**: Check browser console; verify status is not in use ### Issue: Changes not saving **Solution**: Check browser console for AJAX errors; verify anti-forgery token ## Success Indicators - ✅ All 16 default job statuses visible - ✅ All 5 default priorities visible - ✅ All 7 default quote statuses visible - ✅ Can add custom lookups - ✅ Can edit custom lookups (display name only) - ✅ Can delete unused custom lookups - ✅ System-defined lookups protected - ✅ In-use lookups protected - ✅ Usage counts accurate - ✅ Jobs/Quotes can be created with new lookups - ✅ Color badges display correctly ## Next Steps After Testing If all tests pass: - ✅ Mark feature as production-ready - ✅ Document for users in help guide - ✅ Train users on lookup customization If issues found: - 📝 Document the issue with screenshots - 🐛 Report to development team - 🔄 Apply fixes and re-test ## Advanced Testing (Optional) ### Multi-Tenancy Test 1. Login as Company Admin: `admin@demo.com` / `CompanyAdmin123!` 2. Go to: Company Settings > Data Lookups 3. **Verify**: Only see lookups for YOUR company (not other companies) 4. Create a custom status for Demo Company 5. Login as different company admin 6. **Verify**: Custom status NOT visible to other company ### Performance Test 1. Create 1,000 test jobs via seed data 2. Navigate to: Jobs > Index 3. **Verify**: Page loads in < 2 seconds 4. Filter by status 5. **Verify**: Filtering is instant ### Quote Conversion Test 1. Create a quote with status "Draft" 2. Try to convert to job 3. **Expected**: Error "Only approved quotes can be converted" 4. Change quote status to "Approved" 5. Convert to job 6. **Verify**: Conversion succeeds 7. **Verify**: Quote status changes to "Converted" --- **Testing Duration**: 5-15 minutes **Last Updated**: February 13, 2026