T.ME/BIBIL_0DAY
CasperSecurity


Server : Apache/2
System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User : gositeme ( 1004)
PHP Version : 8.2.29
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Directory :  /home/gositeme/domains/lavocat.quebec/public_html/scripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/domains/lavocat.quebec/public_html/scripts/test-share-integrations.js
const fs = require('fs');
const path = require('path');

console.log('šŸ”— Testing EnhancedShareButton Integrations\n');

// Test 1: Check LiveCaseFeed integration
console.log('1. Checking LiveCaseFeed integration...');
const liveCaseFeedPath = path.join(__dirname, '..', 'src', 'components', 'LiveCaseFeed.tsx');
if (fs.existsSync(liveCaseFeedPath)) {
  const content = fs.readFileSync(liveCaseFeedPath, 'utf8');
  if (content.includes('import EnhancedShareButton') && content.includes('EnhancedShareButton')) {
    console.log('āœ… EnhancedShareButton integrated into LiveCaseFeed');
  } else {
    console.log('āŒ EnhancedShareButton not found in LiveCaseFeed');
  }
} else {
  console.log('āŒ LiveCaseFeed.tsx not found');
}

// Test 2: Check profile page integration
console.log('\n2. Checking profile page integration...');
const profilePath = path.join(__dirname, '..', 'src', 'pages', 'profile', '[username].tsx');
if (fs.existsSync(profilePath)) {
  const content = fs.readFileSync(profilePath, 'utf8');
  if (content.includes('import EnhancedShareButton') && content.includes('EnhancedShareButton')) {
    console.log('āœ… EnhancedShareButton integrated into profile page');
  } else {
    console.log('āŒ EnhancedShareButton not found in profile page');
  }
} else {
  console.log('āŒ Profile page not found');
}

// Test 3: Check EnhancedShareButton component exists
console.log('\n3. Checking EnhancedShareButton component...');
const shareButtonPath = path.join(__dirname, '..', 'src', 'components', 'EnhancedShareButton.tsx');
if (fs.existsSync(shareButtonPath)) {
  const content = fs.readFileSync(shareButtonPath, 'utf8');
  if (content.includes('useSocialShare') && content.includes('shareToFacebook')) {
    console.log('āœ… EnhancedShareButton component exists with social sharing functionality');
  } else {
    console.log('āš ļø  EnhancedShareButton component exists but may have issues');
  }
} else {
  console.log('āŒ EnhancedShareButton component not found');
}

// Test 4: Check useSocialShare hook exists
console.log('\n4. Checking useSocialShare hook...');
const hookPath = path.join(__dirname, '..', 'src', 'hooks', 'useSocialShare.ts');
if (fs.existsSync(hookPath)) {
  const content = fs.readFileSync(hookPath, 'utf8');
  if (content.includes('shareToFacebook') && content.includes('shareToTwitter')) {
    console.log('āœ… useSocialShare hook exists with all social platforms');
  } else {
    console.log('āš ļø  useSocialShare hook exists but may have issues');
  }
} else {
  console.log('āŒ useSocialShare hook not found');
}

// Test 5: Check CaseDetail integration (from earlier)
console.log('\n5. Checking CaseDetail integration...');
const caseDetailPath = path.join(__dirname, '..', 'src', 'components', 'CaseDetail.tsx');
if (fs.existsSync(caseDetailPath)) {
  const content = fs.readFileSync(caseDetailPath, 'utf8');
  if (content.includes('import EnhancedShareButton') && content.includes('EnhancedShareButton')) {
    console.log('āœ… EnhancedShareButton integrated into CaseDetail');
  } else {
    console.log('āŒ EnhancedShareButton not found in CaseDetail');
  }
} else {
  console.log('āŒ CaseDetail.tsx not found');
}

console.log('\nšŸŽ‰ Integration Test Complete!');
console.log('\nšŸ“‹ Summary:');
console.log('- Live Cases Feed: Share buttons on case cards');
console.log('- User Profiles: Share buttons on profile pages');
console.log('- Case Details: Enhanced share functionality');
console.log('- All platforms: Facebook, Twitter, LinkedIn, WhatsApp, Copy');
console.log('\nšŸš€ Ready for testing!'); 

CasperSecurity Mini