# Testing Plan – ZMB Webui auf 192.168.1.179 **Date**: 2026-04-18 **Target**: Test-LXC Container at 192.168.1.179 **Backend**: Should be running on :8000 **Frontend**: Will test via npm dev or static export --- ## Pre-Test Checklist - [ ] Backend still running? `curl http://192.168.1.179:8000/health` - [ ] SSH access available? `ssh root@192.168.1.179` --- ## Test Scenario 1: Frontend Dev Server (Slow, Good for Debugging) ```bash # On your local machine cd frontend npm install # If not done npm run dev # Starts on http://localhost:3000 # Visit http://localhost:3000 # Browser will call API at: http://192.168.1.179:8000 (via .env.local) ``` **Test Flow**: 1. Go to `/login` → Enter `admin / ` 2. Dashboard → Should show pools (or empty if no ZFS) 3. **Check menu**: Snapshots + Datasets visible? (Only if ZFS available) 4. Click each page to verify it loads --- ## Test Scenario 2: Static Export (Faster, Production-like) ```bash # On local machine cd frontend npm run build npm run export # Creates ./out/ with static HTML # Copy to test-container scp -r out/* root@192.168.1.179:/opt/zmb-webui/backend/static/ # Or just test locally with nginx python3 -m http.server 3000 --directory out/ # Visit http://localhost:3000 ``` --- ## Test Checklist – All Pages ### Login Page - [ ] Username/password input visible - [ ] Login button works - [ ] After login → redirects to Dashboard - [ ] Token saved in localStorage ### Dashboard - [ ] Header loads with logo - [ ] Pool cards visible (if ZFS on container) - [ ] Capacity bar shows - [ ] Auto-refresh every 30s (check network tab) - [ ] Health badge color correct (ONLINE green, DEGRADED yellow, etc.) ### Menu Visibility (ZFS-Conditional) ``` ✅ Always visible: - Dashboard - Files - Identities ❓ Conditional (only if ZFS available on container): - Snapshots - Datasets ``` - [ ] Check browser console for `/api/status` call - [ ] Verify `zfs_available: true/false` response ### Snapshots Page - [ ] Page loads (if ZFS available) - [ ] Table shows header: Name, Dataset, Created, Used - [ ] Refresh button works - [ ] Delete button triggers dialog ### Datasets Page - [ ] Tab navigation works (Datasets ↔ Shares) - [ ] Datasets tab: List visible, Create button clickable - [ ] Shares tab: Samba + NFS subtabs work - [ ] Create dialogs open/close properly ### Files Page - [ ] Loads and shows current directory - [ ] Breadcrumb navigation works - [ ] Can navigate up and into directories - [ ] Upload button works (try small file) - [ ] Create Folder dialog works - [ ] View toggle (List ↔ Grid) works - [ ] Search box works - [ ] File selection and multi-select works - [ ] Delete dialog confirms action ### Identities Page - [ ] Users tab shows Linux users table - [ ] Samba subtab shows or empty message - [ ] Groups tab lists groups - [ ] Login History shows recent logins - [ ] Create User dialog fields present - [ ] Create Group dialog present --- ## API Endpoint Tests (curl) ```bash # Get token TOKEN=$(curl -s -X POST http://192.168.1.179:8000/api/auth/login \ -H "Content-Type: application/json" \ -d '{"username":"admin","password":""}' | jq -r '.access_token') echo "Token: $TOKEN" # Check ZFS availability curl -s http://192.168.1.179:8000/api/status | jq . # List pools (should work even on container with no ZFS) curl -s http://192.168.1.179:8000/api/pools \ -H "Authorization: Bearer $TOKEN" | jq . # List users curl -s http://192.168.1.179:8000/api/identities/users \ -H "Authorization: Bearer $TOKEN" | jq . # List datasets (may fail if no ZFS) curl -s http://192.168.1.179:8000/api/datasets \ -H "Authorization: Bearer $TOKEN" | jq . # List shares curl -s http://192.168.1.179:8000/api/shares/samba \ -H "Authorization: Bearer $TOKEN" | jq . ``` --- ## Common Issues & Debugging ### "Cannot GET /" or 404 - Backend might not be serving static files - Check: `ls -la /opt/zmb-webui/backend/static/` - If empty, need to do `npm run export` and `scp` ### CORS errors in browser console - Backend allow_origins set to `["*"]` — should work - Check backend logs: `journalctl -u zmb-webui-backend -f` ### API call fails with 401 - Token expired or invalid - Logout (clear localStorage) → Login again - Check token in localStorage: `localStorage.getItem('access_token')` ### Snapshots/Datasets menu hidden - `/api/status` returned `zfs_available: false` - This is expected on container without ZFS - Test on actual Pi if need to test ZFS features ### Files not uploading - Check file size (< some limit?) - Check `/tank/share` exists and is writable - Check backend logs for upload errors --- ## Success Criteria - [ ] All pages load without errors - [ ] Navigation menu works - [ ] Login/logout works - [ ] ZFS-conditional menu works (menu items hide/show correctly) - [ ] File manager can browse and upload - [ ] No console errors (check F12) - [ ] No 401/403 errors - [ ] All dialogs open/close properly --- ## After Testing If all ✅: ```bash # Build final static export cd frontend npm run build npm run export # Deploy to Pi scp -r out/* root@10.66.120.3:/opt/zmb-webui/backend/static/ ``` If issues ❌: - Document error messages - Check browser console (F12 → Console tab) - Run curl tests to isolate backend vs frontend - Check backend logs on container