#!/usr/bin/env node /** * Test script to verify demo sites are working correctly */ import { execSync } from 'child_process'; import fs from 'fs'; import path from 'path'; console.log('๐Ÿงช Testing Insertr Demo Infrastructure'); console.log('=====================================\n'); // Test 1: Check if enhanced sites exist console.log('๐Ÿ“ Checking enhanced test sites...'); const danEdenPath = './test-sites/simple/dan-eden-portfolio-enhanced'; if (fs.existsSync(danEdenPath)) { console.log('โœ… Dan Eden enhanced site exists'); // Check if it has insertr elements const indexPath = path.join(danEdenPath, 'index.html'); if (fs.existsSync(indexPath)) { const content = fs.readFileSync(indexPath, 'utf8'); const insertrElements = content.match(/data-content-id="[^"]+"/g); if (insertrElements && insertrElements.length > 0) { console.log(`โœ… Found ${insertrElements.length} insertr-enhanced elements`); } else { console.log('โŒ No insertr elements found in enhanced site'); } } else { console.log('โŒ index.html not found in enhanced site'); } } else { console.log('โŒ Dan Eden enhanced site not found'); console.log(' Run: just enhance-test-sites'); } console.log('\n๐ŸŽฏ Demo Commands Available:'); console.log(' just demo - Default demo'); console.log(' just demo dan-eden - Dan Eden portfolio demo'); console.log(' just list-demos - List all available demos'); console.log('\n๐Ÿš€ Testing complete!');