INTEGRATION TEST PLAN
Ecosistema completo para organización y gestión de contenido con interfaces espaciales
🧪 Canvas Template Integration - Test Plan
📋 Overview
This document outlines the step-by-step testing plan to verify that our template module system works end-to-end in the Modular Universe Builder.
✅ Phase 1: Build & Registration (READY TO TEST)
Step 1: Build All Template Modules
# Build all 6 template modules
nx build @canvas-templates/split-sidebar
nx build @canvas-templates/two-column-equal
nx build @canvas-templates/three-column-equal
nx build @canvas-templates/header-content-footer
nx build @canvas-templates/dashboard
nx build @canvas-templates/custom
Expected Output:
- ✅ All 6 builds succeed without errors
- ✅ Each module outputs to
dist/modules/canvas-templates/{template-name}/ - ✅ Each has
index.d.tsat root level (not nested under/src/)
Step 2: Verify Module Registration
# Start the dev server
nx serve gograb-space
Expected Console Output:
🔍 [MAIN] Module bootstrap starting...
🧩 Registering platform modules...
🎨 Registering canvas template modules...
✅ Registered 15 modules (including 6 canvas templates)
Browser Console Check:
// Open DevTools Console and run:
const registry = window['__moduleRegistry__'] ||
(await import('@libs-core/module-base')).inject(ModuleRegistryService);
// Get template modules
const templates = registry.getAllModules().filter(m => m.category === 'layout-template');
console.log('Template Modules:', templates.map(t => ({ id: t.id, name: t.name })));
// Expected Output:
// [
// { id: 'template-split-sidebar', name: 'Split Sidebar Template' },
// { id: 'template-two-column-equal', name: 'Two Column Equal Template' },
// { id: 'template-three-column-equal', name: 'Three Column Equal Template' },
// { id: 'template-header-content-footer', name: 'Header Content Footer Template' },
// { id: 'template-dashboard', name: 'Dashboard Template' },
// { id: 'template-custom', name: 'Custom Template' }
// ]
✅ Phase 2: UI Integration Test
Step 3: Navigate to Modular Universe Builder
- Login/Create Guest User (if not already authenticated)
- Navigate to:
http://localhost:5200/space/demo-space/modular-universe
Expected UI:
- ✅ Canvas builder loads
- ✅ Toolbar visible at top
- ✅ Left sidebar (mode selector) visible
- ✅ Right sidebar (config panel) visible
- ✅ Center canvas area ready
Step 4: Open Layout Selector
- Click "Select Layout" button (or similar UI control)
- Observe the layout template cards
Expected Result:
- ✅ Layout selector modal/panel opens
- ✅ 6 template cards displayed:
- Split Sidebar Template (📐)
- Two Column Equal Template (📏)
- Three Column Equal Template (🎯)
- Header Content Footer Template (🌐)
- Dashboard Template (📊)
- Custom Template (⚡)
- ✅ Each card shows:
- Icon
- Name
- Description
- Preview SVG
- Responsive badge (if applicable)
- Complexity indicator (if applicable)
Step 5: Select a Template
- Click on "Split Sidebar Template"
- Observe the canvas
Expected Result:
- ✅ Canvas updates to show split sidebar layout (visual representation)
- ✅ Layout selector closes
- ✅ Root section structure updates to use
template-split-sidebar - ✅ TWO REGIONS visible:
- Sidebar region (300px fixed width)
- Main region (flexible, takes remaining space)
✅ Phase 3: Persistence Test
Step 6: Verify State Persistence
- Select "Split Sidebar Template"
- Refresh the page (
Cmd+RorCtrl+R) - Observe the canvas after reload
Expected Result:
- ✅ Canvas restores with split sidebar layout intact
- ✅ No need to re-select template
- ✅ All state persisted via
GgStorage(IndexedDB)
Browser Console Check:
// Check storage directly
const storage = window['__ggStorageInstance__'];
const canvasState = await storage.get('universe-canvas-v3-state');
console.log('Canvas State:', canvasState);
// Expected Output:
// {
// rootSection: {
// id: '...',
// moduleId: 'template-split-sidebar', // ✅ Template module ID
// layout: { type: 'grid' },
// regions: [
// { name: 'sidebar', width: '300px' },
// { name: 'main', flex: true }
// ]
// }
// }
✅ Phase 4: Multi-Template Test
Step 7: Switch Between Templates
- Select "Dashboard Template"
- Observe canvas updates (should show 4 regions: header, sidebar, main, footer)
- Select "Two Column Equal Template"
- Observe canvas updates (should show 2 equal-width columns)
- Select "Custom Template"
- Observe (should allow custom grid configuration)
Expected Result:
- ✅ Each template switches cleanly
- ✅ No errors in console
- ✅ Visual updates match template structure
- ✅ Persistence works for all templates
✅ Phase 5: Module Drop Test (Future - PENDING)
Step 8: Drop Modules into Regions
Note: This step is PENDING until "regions as module containers" is implemented.
- Select "Split Sidebar Template"
- Open Module Palette (drag-drop panel)
- Drag a widget module (e.g.,
button-widget) into the sidebar region - Observe
Expected Result (when implemented):
- ✅ Widget module drops into sidebar region
- ✅ Region highlights during drag
- ✅ Module renders inside region
- ✅ State persists after refresh
🚨 Known Issues / Limitations
Current Limitations:
- ❌ Regions are not yet module containers - can't drop modules into them
- ❌ No visual rendering of regions - canvas shows structure but not actual grid/flex layout
- ❌ No module palette integration - can't drag/drop widgets yet
Next Steps to Complete:
- 🔄 Implement
RegionContainerComponent(renders a region that accepts module drops) - 🔄 Update
CanvasSectionComponentto render regions using template's renderer component - 🔄 Integrate module palette with drag-drop system
- 🔄 Add visual grid/flex rendering for templates
📝 Test Checklist
Use this checklist to track your testing progress:
- All 6 template modules build successfully
- Modules register in app.config.ts without errors
- Browser console shows "Registered 15 modules (including 6 canvas templates)"
- Layout selector displays 6 template cards
- Selecting a template updates the canvas visually
- Template selection persists after page refresh
- Can switch between different templates without errors
- Module registry reports correct template count
- No TypeScript errors in browser console
- No build errors during nx serve
🐛 Debugging Tips
If templates don't appear in layout selector:
// Check module registry
const registry = window['__moduleRegistry__'];
const allModules = registry?.getAllModules() || [];
console.log('All Modules:', allModules);
// Filter by category
const templates = allModules.filter(m => m.category === 'layout-template');
console.log('Templates:', templates);
// If empty, check for errors in module registration
If templates appear but selection doesn't work:
// Check if selectLayout event is emitted
// Add console.log in layout-selector.component.ts:
selectLayout.emit(template.id);
console.log('Selected template:', template.id);
If persistence doesn't work:
// Check storage
const storage = window['__ggStorageInstance__'];
const state = await storage.get('universe-canvas-v3-state');
console.log('Persisted State:', state);
// Force save
await storage.set('universe-canvas-v3-state', { test: 'data' });
const retrieved = await storage.get('universe-canvas-v3-state');
console.log('Retrieved:', retrieved); // Should show { test: 'data' }
✅ Success Criteria
The integration is considered successful when:
- ✅ All 6 template modules build without errors
- ✅ Modules register and appear in browser console
- ✅ Layout selector shows 6 templates with correct names/icons
- ✅ Selecting a template updates the canvas (even if visual rendering is basic)
- ✅ Template selection persists across page reloads
- ✅ No console errors during normal operations
- ✅ Can switch between templates smoothly
Status: 🟡 READY FOR TESTING
Blocker: Need to build template modules and verify imports work
Next Action: Run build commands for all 6 templates
Last Updated: November 24, 2025
Test Environment: Local development (port 5200)
Target Route: /space/demo-space/modular-universe