4.7 KiB
4.7 KiB
Quick Testing Guide - Lookup Management Feature
Prerequisites
- Database migration applied:
ConvertEnumsToLookupTables - Application built successfully
- Seed data loaded (via Platform Management > Seed Data)
5-Minute Quick Test
Test 1: View Existing Lookups (2 minutes)
- Start the application:
cd src/PowderCoating.Web && dotnet run - Navigate to:
https://localhost:58461 - Login as SuperAdmin:
superadmin@powdercoating.com/SuperAdmin123! - Click: Company Settings (in left sidebar)
- Click: Data Lookups tab
- Expected: See 3 sub-tabs: Job Statuses, Job Priorities, Quote Statuses
- Verify: Job Statuses shows 16 default statuses with color badges
- Verify: Usage counts display (e.g., "5 jobs")
Test 2: Create Custom Lookup (1 minute)
- On Job Statuses sub-tab, click: Add Job Status
- Enter code:
TEST_STATUS - Enter display name:
Test Status - Expected: Success toast notification
- Verify: New status appears in table at bottom
Test 3: Edit Custom Lookup (1 minute)
- Find the "Test Status" row
- Click: Edit button (pencil icon)
- Change display name to:
My Custom Status - Expected: Success toast notification
- Verify: Table refreshes with new name
Test 4: Delete Custom Lookup (1 minute)
- Find the "My Custom Status" row
- Click: Delete button (trash icon)
- Confirm deletion
- Expected: Success toast notification
- Verify: Status removed from table
Test 5: Verify Jobs Use Lookups (30 seconds)
- Navigate to: Jobs > Create New Job
- Verify: Status dropdown shows all statuses (including any custom ones)
- Verify: Priority dropdown shows all priorities
- Create a job and verify it saves successfully
System Protection Tests
Test 6: Try to Delete System-Defined Status
- Go to: Company Settings > Data Lookups > Job Statuses
- Find "Pending" status (marked with [System] badge)
- Verify: Delete button is DISABLED with tooltip "System-defined"
Test 7: Try to Delete In-Use Status
- Create a job with status "In Preparation"
- Go to: Company Settings > Data Lookups > Job Statuses
- Try to delete "In Preparation" status
- 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
- Login as Company Admin:
admin@demo.com/CompanyAdmin123! - Go to: Company Settings > Data Lookups
- Verify: Only see lookups for YOUR company (not other companies)
- Create a custom status for Demo Company
- Login as different company admin
- Verify: Custom status NOT visible to other company
Performance Test
- Create 1,000 test jobs via seed data
- Navigate to: Jobs > Index
- Verify: Page loads in < 2 seconds
- Filter by status
- Verify: Filtering is instant
Quote Conversion Test
- Create a quote with status "Draft"
- Try to convert to job
- Expected: Error "Only approved quotes can be converted"
- Change quote status to "Approved"
- Convert to job
- Verify: Conversion succeeds
- Verify: Quote status changes to "Converted"
Testing Duration: 5-15 minutes Last Updated: February 13, 2026