- Implemented tests for debugging browser cache vs server response. - Verified calendar displays correct dates for November 2025. - Added visual inspection screenshot for calendar layout. - Created tests to ensure calendar fits within its container. - Checked for correct styling of available and blocked dates. - Debugged login form behavior and cookie handling. - Added tests for forced browser refresh and cache verification. - Conducted visual tests to compare actual calendar layout with expected. - Enhanced logging for better traceability during test execution.
4.6 KiB
4.6 KiB
Database Migration - Manual Test Checklist
✅ Automated Tests (COMPLETED)
- GET /api/menus returns 16 menus
- GET /api/packages returns 5 packages
- POST /api/bookings with menu_id calculates correct price (7760 kr test passed)
- GET /api/bookings returns created booking with menu_id
- DELETE /api/bookings removes booking
- 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
-- 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
-- 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