5.4 KiB
5.4 KiB
Test Guide - Digital Access and Serving System
Quick Start
- Start the system (if not already running):
# Terminal 1: Database
docker-compose up -d
# Terminal 2: Backend (will auto-seed database)
dotnet run --project src/Hospitality.Backend
# Terminal 3: Frontend
cd src/hospitality-web
npm run dev
- Access the application: http://localhost:5173
Sample Data Overview
The database is pre-loaded with:
Events
- Summer Festival 2025 (July 1-3, Oslo)
- Winter Gala 2025 (December 15, Bergen)
Groups (Summer Festival)
- VIP Sponsors - 3 people
- Event Staff - 2 people
- General Admission - 2 people
Products (Summer Festival)
- Beer (Drink)
- Wine (Drink)
- Lunch (Meal)
- Dinner (Meal)
- VIP Lounge Access (Access)
Test Guests with QR Codes
Note: QR codes are GUIDs that change each time you seed. To get the actual QR codes:
- Go to Admin → Summer Festival 2025 → VIP Sponsors
- Click on a person to see their QR code
Test Scenarios
Scenario 1: Admin - View Existing Data
- Go to http://localhost:5173
- You should see 2 events: "Summer Festival 2025" and "Winter Gala 2025"
- Click on "Summer Festival 2025"
- You should see:
- 3 groups (VIP Sponsors, Event Staff, General Admission)
- 5 products (Beer, Wine, Lunch, Dinner, VIP Lounge Access)
Scenario 2: Admin - View Group Details
- From Event Detail page, click on "VIP Sponsors"
- You should see 3 people:
-
John Doe (john.doe@example.com)
- Beer: 8/10 remaining
- Wine: 4/5 remaining
- Lunch: 2/3 remaining
- Dinner: 3/3 remaining
- VIP Access: 1/1 remaining
-
Jane Smith (jane.smith@example.com)
- All quotas unused (full amounts)
-
Bob Wilson (bob.wilson@example.com)
- Beer: 9/12 remaining
- Wine: 2/4 remaining
- Lunch: 1/3 remaining
- Dinner: 2/3 remaining
- VIP Access: 0/1 (used)
-
Scenario 3: Staff Scanner - Lookup Guest
- Go to http://localhost:5173/staff
- From Admin, get John Doe's QR code:
- Go to Summer Festival → VIP Sponsors → John Doe
- Copy the QR code (GUID under "QR: ...")
- Paste the QR code in Staff Scanner
- Click "Lookup Person"
- You should see:
- Name: John Doe
- Email: john.doe@example.com
- All quotas with remaining amounts
- Click "Use 1" on Beer
- Verify quota decreases from 8 to 7
Scenario 4: Guest View - Check Quotas
- Go to http://localhost:5173/guest
- Enter John Doe's QR code (same as above)
- Click "Show My QR Code"
- You should see:
- Large QR code for scanning
- All quotas with progress bars
- Updated Beer quota (7/10 if you used 1 in Scenario 3)
Scenario 5: Admin - Add New Person
- Go to Summer Festival → VIP Sponsors
- Click "Add Person"
- Fill in:
- Name: "Test User"
- Email: "test@example.com"
- Phone: "+47 999 88 777"
- Click "Add Person"
- Person appears in the list with a new QR code
- Click "Assign Quota" on the new person
- Select "Beer" and amount "5"
- Click "Assign Quota"
- Verify quota appears under the person
Scenario 6: Test Different User Types
VIP Sponsor (High Quotas)
- Use Jane Smith's QR code
- Has full quotas: Beer (8), Wine (6), Lunch (3), Dinner (3), VIP Access (1)
Staff Member (Limited Quotas)
- Use Alice Staff's QR code
- Has: Beer (3/4), Lunch (1/2)
General Guest (Basic Quotas)
- Use Emily Guest's QR code
- Has: Beer (2/3), Lunch (1/1)
Heavy User (Mostly Used)
- Use Bob Wilson's QR code
- Has used most quotas, VIP Access is depleted
Testing Checklist
- View events list
- View event details with groups and products
- View group details with people
- View person's QR code and quotas
- Add new person to group
- Assign quota to person
- Use Staff Scanner to lookup person
- Record transaction (Use 1 or Use 2)
- Verify quota decreases after transaction
- Use Guest View to see QR code
- Verify progress bars show correct status
- Test with different user types (VIP, Staff, Guest)
- Try to use more than remaining quota (should fail)
Expected Behaviors
Success Cases
- ✅ Quotas display correctly with remaining amounts
- ✅ Transactions record successfully when quota available
- ✅ Quota decrements after transaction
- ✅ Progress bars update in real-time
- ✅ QR codes are unique per person
Error Cases
- ❌ Cannot use more than remaining quota
- ❌ Invalid QR code shows "Not Found"
- ❌ Empty fields in forms show validation errors
Quick Reference - Sample QR Codes
To get actual QR codes:
- Go to Admin → Summer Festival 2025
- Click on a group (e.g., VIP Sponsors)
- Each person's card shows their QR code (starts with "QR: ...")
- Copy the full GUID for testing
Sample People:
- John Doe - Has some usage, good for testing transactions
- Jane Smith - Fresh quotas, good for first-time testing
- Bob Wilson - Heavy usage, good for testing limits
- Alice Staff - Staff member with limited quotas
- Emily Guest - Basic guest with minimal quotas
Troubleshooting
No data showing?
- Restart backend:
dotnet run --project src/Hospitality.Backend - Database will auto-seed on startup
QR code not working?
- Make sure you copied the full GUID
- QR codes are case-sensitive
- Get fresh QR code from Admin interface
Transaction fails?
- Check remaining quota is > 0
- Verify you're using correct QR code
- Check browser console for errors
Enjoy testing! 🎉