TESTING GUIDE
Documentation for Sessions
Session 16.1 Testing Guide
Complete Platform Building Flow Test
This guide walks through testing the complete platform building process from start to finish.
Prerequisites
Servers Running:
# Terminal 1: Frontend yarn dev:gograb # Terminal 2: Backend AI API yarn serve:backend-aiSpace Context: Have a space created (e.g.,
chrome-space-1)
Test 1: Routing - Space-Aware Navigation
1.1 Direct Navigation to Vibe
URL: http://localhost:5200/space/chrome-space-1/vibe
Expected:
- ✅ VibeUniverseGenerator loads successfully
- ✅ No routing errors in console
- ✅ Header shows "AI Platform Generator"
1.2 Universe-Scoped Vibe
URL: http://localhost:5200/space/chrome-space-1/universe/test-universe/vibe
Expected:
- ✅ VibeUniverseGenerator loads with universe context
- ✅ Universe context preserved in UniverseContextService
- ✅ Query params include
universeIdor route paramuniverseSlug
1.3 Workbench Navigation
URL: http://localhost:5200/space/chrome-space-1/modularity/workbench/test-module
Expected:
- ✅ Module Workbench loads successfully
- ✅ No
NG04002routing error - ✅ Module context loaded
Test 2: Intelligent Suggestions
2.1 Restaurant Platform
Steps:
- Navigate to Vibe:
/space/chrome-space-1/vibe - Start typing: "I want a restaurant"
- Wait 300ms (debounce)
Expected:
- ✅ Suggestions dropdown appears
- ✅ Shows "Restaurant Management Platform" suggestion
- ✅ Industry badge shows "restaurant"
- ✅ Suggested modules include: menu-management, reservation-system, order-tracking
- ✅ Confidence indicator shows ~95%
2.2 Retail Platform
Steps:
- Clear input
- Type: "retail store with inventory"
Expected:
- ✅ Shows "Retail Management Platform" suggestion
- ✅ Industry badge shows "retail"
- ✅ Suggested modules include: product-catalog, inventory-management, point-of-sale
2.3 Keyboard Navigation
Steps:
- Type "fitness gym"
- Press
↓(down arrow) - Press
↑(up arrow) - Press
Enter
Expected:
- ✅ Arrow keys highlight suggestions
- ✅ Enter selects highlighted suggestion
- ✅ Input populated with suggestion description
- ✅ Suggestions dropdown closes
2.4 Escape to Close
Steps:
- Type "healthcare"
- Press
Esc
Expected:
- ✅ Suggestions dropdown closes
- ✅ Input remains unchanged
Test 3: Complete Tool Integration Flow
3.1 Vibe → Universe Canvas
Steps:
- Navigate to
/space/chrome-space-1/vibe - Type platform description or select suggestion
- Click "Generate Platform"
- Wait for generation to complete
- Click "Deploy to Universe"
Expected:
- ✅ Navigation to
/space/chrome-space-1/modular-universe - ✅ Query params include
pendingModuleandsource=ai-platform-generator - ✅ Universe Canvas loads
- ✅ Generated modules ready to drop on canvas
Console Checks:
[ModularityIntegration] Module generated
[ModularityIntegration] Proceeding to universe canvas
[PlatformEvent] TOOL_SWITCHED from ai-platform-generator to modular-universe
3.2 Universe Canvas → Workbench
Steps:
- In Universe Canvas, right-click a module
- Select "Edit Module" or "Refine in Workbench"
Expected:
- ✅ Navigation to
/space/chrome-space-1/modularity/workbench/{moduleId} - ✅ Query params include
returnTo=modular-universeanduniverseId - ✅ Module Workbench loads with module data
- ✅ Return context detected
Console Checks:
[ModularityIntegration] Opening module in workbench for refinement
[ModuleWorkbench] Return context detected: { tool: 'modular-universe', universeId: '...' }
3.3 Workbench → Universe Canvas (Return)
Steps:
- In Module Workbench, click "Return" or "Back to Universe"
Expected:
- ✅ Navigation back to
/space/chrome-space-1/modular-universe - ✅ Query params include
universeId(preserved) - ✅ Universe Canvas loads with same universe
- ✅ Module changes visible
Console Checks:
[ModuleWorkbench] Returning to previous tool: { tool: 'modular-universe', universeId: '...' }
[ToolNavigation] Navigating to tool: modular-universe
Test 4: MongoDB Sync
4.1 Platform State Sync
Steps:
- Generate a platform in Vibe
- Open browser DevTools → Application → IndexedDB
- Check
flash-persistencedatabase - Look for
unified-current-platformkey
Expected:
- ✅ Platform data stored in IndexedDB
- ✅ Contains modules, pages, navigation
- ✅ Timestamps updated
4.2 MongoDB Sync (if backend connected)
Steps:
- In PlatformStateService, call
syncToMongoDB() - Check MongoDB for universe document
Expected:
- ✅ Universe document created/updated in MongoDB
- ✅ Contains converted UniversalModule[] from platform modules
- ✅ Slug generated from platform name
Test 5: Backend Suggestions API
5.1 API Endpoint Test
Request:
curl -X POST http://localhost:3000/workflow/suggest \
-H "Content-Type: application/json" \
-d '{"input": "restaurant management system"}'
Expected Response:
{
"industries": ["restaurant"],
"modules": [
{
"id": "menu-management",
"name": "Menu Management",
"description": "Manage menu items, categories, pricing, and availability",
"entities": ["MenuItem", "MenuCategory", "MenuSection"],
"actions": ["createMenuItem", "updateMenuItem", "deleteMenuItem", "listMenuItems"],
"priority": 10
},
// ... more modules
],
"entities": [
{
"name": "MenuItem",
"description": "A menu item with pricing and details",
"fields": [...],
"relationships": ["MenuCategory", "Order"]
}
],
"confidence": 0.85
}
Troubleshooting
Issue: NG04002 Routing Error
Symptom: Cannot match any routes. URL Segment: 'space/chrome-space-1/workbench/...'
Fix: Ensure all services use space-aware routing:
- Check
ToolNavigationService.buildRoute()uses/space/:spaceSlug/... - Check
ModularityIntegrationServicemethods usegetSpaceSlug()
Issue: Suggestions Not Appearing
Symptom: Type in input but no suggestions show
Checks:
- Input length > 3 characters?
- Wait 300ms for debounce?
- Check console for errors
- Verify
ModuleSuggestionsServiceis injected
Issue: Context Lost Between Tools
Symptom: Navigate to Workbench, return to Universe, context lost
Checks:
- Verify
returnToquery param is set - Check
ModuleWorkbench.returnContextsignal - Verify
UniverseContextServicehas spaceId and universeId
Issue: MongoDB Sync Fails
Symptom: syncToMongoDB() throws error
Checks:
- Backend running and accessible?
RealtimeSyncServiceconnected?- Space context available in
UniverseContextService?
Performance Benchmarks
| Operation | Target | Actual |
|---|---|---|
| Suggestion debounce | 300ms | ✅ |
| Suggestion generation | < 100ms | ✅ |
| Route navigation | < 200ms | ✅ |
| MongoDB sync | < 500ms | ⏳ |
Browser Console Commands
// Check universe context
window['ng'].getComponent(document.querySelector('lib-vibe-universe-generator')).universeContext.context()
// Check platform state
window['ng'].getComponent(document.querySelector('lib-vibe-universe-generator')).integration.currentGeneration()
// Check suggestions
window['ng'].getComponent(document.querySelector('lib-intelligent-input')).activeSuggestions()
Success Criteria Summary
✅ All routing paths work without errors
✅ Intelligent suggestions appear and are selectable
✅ Context flows seamlessly between all three tools
✅ MongoDB sync operational
✅ Backend API responds correctly
✅ No duplicate interfaces created
✅ All existing infrastructure reused properly
Status: All core functionality implemented and ready for testing