# Database Migration - Manual Test Checklist ## βœ… Automated Tests (COMPLETED) - [x] GET /api/menus returns 16 menus - [x] GET /api/packages returns 5 packages - [x] POST /api/bookings with menu_id calculates correct price (7760 kr test passed) - [x] GET /api/bookings returns created booking with menu_id - [x] DELETE /api/bookings removes booking - [x] Admin auth protection working ## πŸ“‹ Manual Frontend Tests ### Homepage (/) - [ ] Visit http://localhost:3000/ - [ ] Verify featured menus load from database - [ ] Click "Se alle menuer" button ### Menu Browse (/menuer) - [ ] Verify 16 menus are displayed - [ ] Check each menu shows: - [ ] Title - [ ] Description - [ ] Price per cover - [ ] Tags (vegetarisk, glutenfri, etc.) - [ ] Image or placeholder - [ ] Test filters (if any) - [ ] Click on a menu to view details ### Packages (/pakker) - [ ] Verify 5 packages are displayed - [ ] Check package details: - [ ] Name - [ ] Associated menu - [ ] Price per cover - [ ] Includes list - [ ] Upsells - [ ] Click "Book nu" on a package ### Booking Form (/book) - [ ] Form loads without errors - [ ] Menu selection dropdown shows 16 menus from database - [ ] Package selection shows 5 packages from database - [ ] Select a menu (e.g., "Asian Fusion" - 745 kr/cover) - [ ] Enter party size (e.g., 8 people) - [ ] Check service checkbox (+100 kr/cover) - [ ] Check cleanup checkbox (+500 kr flat) - [ ] Verify price calculation: - Menu: 745 Γ— 8 = 5,960 kr - Service: 100 Γ— 8 = 800 kr - Cleanup: 500 kr - Reservation: 500 kr - **Total: 7,760 kr** - [ ] Fill in contact details - [ ] Select date and time - [ ] Submit booking - [ ] Verify success message shows correct price ### Admin - Bookings (/admin/bookings) - [ ] Login with admin credentials - [ ] Verify bookings list loads - [ ] Check financial summary displays: - [ ] Total bookings count - [ ] Total revenue - [ ] Estimated profit (40%) - [ ] Find your test booking - [ ] Verify it shows: - [ ] Correct menu_id - [ ] Correct total price - [ ] Party size - [ ] Click "Vis rΓ₯varer" button - [ ] Verify ingredients display with calculated quantities: - [ ] Ingredients scaled by party size - [ ] Per-cover items show correct multiplication - [ ] Fixed quantity items unchanged - [ ] Test "Annuller" button (confirm it works) ### Admin - Menus (/admin/menus) - [ ] Navigate to admin menus - [ ] Verify table shows all 16 menus - [ ] Check columns: - [ ] Title - [ ] Price per cover - [ ] Ingredients count - [ ] Tags - [ ] Test delete function (use a test menu) - [ ] Test edit button (should redirect to generator) ### Admin - Menu Generator (/admin/menu-generator) - [ ] Generate a new menu with AI - [ ] Verify it saves to database - [ ] Check it appears in /admin/menus list - [ ] Check it appears in /menuer page - [ ] Verify ingredients are saved correctly ## πŸ” Database Consistency Tests ### Menu Data Integrity ```sql -- Run these queries to verify data SELECT COUNT(*) FROM menus; -- Should be 16+ SELECT COUNT(*) FROM menu_ingredients; -- Should be 196+ SELECT COUNT(*) FROM packages; -- Should be 5 SELECT * FROM menus WHERE id = 'fusion-menu'; SELECT * FROM menu_ingredients WHERE menu_id = 'fusion-menu'; ``` ### Booking-Menu Relationship ```sql -- Verify all bookings reference valid menus SELECT b.id, b.menu_id, m.title FROM bookings b LEFT JOIN menus m ON b.menu_id = m.id WHERE b.menu_id IS NOT NULL; -- Check for orphaned menu_ids (should return 0 rows) SELECT * FROM bookings WHERE menu_id IS NOT NULL AND menu_id NOT IN (SELECT id FROM menus); ``` ## ⚑ Performance Tests - [ ] Menu page loads in < 1 second - [ ] Booking form responds quickly - [ ] Admin pages load efficiently - [ ] Database queries use proper indexes ## πŸ› Error Handling Tests - [ ] Try booking without selecting menu (should show validation error) - [ ] Try accessing admin without login (should redirect) - [ ] Try deleting non-existent booking (should show error) - [ ] Test with invalid dates (should reject) - [ ] Test with overlapping time slots (should reject) ## πŸ“Š Test Results Summary **Date:** 2025-11-07 **Tested by:** Automated + Manual **Environment:** Production (PM2 restart #33) ### Automated Test Results - βœ… All API endpoints working - βœ… Price calculation correct - βœ… Database queries successful - βœ… CRUD operations functional ### Manual Test Results - [ ] Frontend pages loading correctly - [ ] User flow complete without errors - [ ] Admin interface fully functional - [ ] Data consistency verified ### Issues Found - Image loading errors (christian-warme.jpg) - non-critical ### Sign-off - [ ] All tests passed - [ ] Ready for production - [ ] Data migration complete