## Major Enhancements ### 🏗️ Architecture & Infrastructure - Implement comprehensive Docker testing infrastructure with hermetic environment - Add Forgejo Actions CI/CD pipeline for automated deployments - Create Page Object Model (POM) testing architecture reducing test duplication by 90% - Establish security-first development patterns with input validation and output escaping ### 🧪 Testing Framework Modernization - Migrate 146+ tests from 80 duplicate files to centralized architecture - Add comprehensive E2E test suites for all user roles and workflows - Implement WordPress error detection with automatic site health monitoring - Create robust browser lifecycle management with proper cleanup ### 📚 Documentation & Guides - Add comprehensive development best practices guide - Create detailed administrator setup documentation - Establish user guides for trainers and master trainers - Document security incident reports and migration guides ### 🔧 Core Plugin Features - Enhance trainer profile management with certification system - Improve find trainer functionality with advanced filtering - Strengthen master trainer area with content management - Add comprehensive venue and organizer management ### 🛡️ Security & Reliability - Implement security-first patterns throughout codebase - Add comprehensive input validation and output escaping - Create secure credential management system - Establish proper WordPress role-based access control ### 🎯 WordPress Integration - Strengthen singleton pattern implementation across all classes - Enhance template hierarchy with proper WordPress integration - Improve page manager with hierarchical URL structure - Add comprehensive shortcode and menu system ### 🔍 Developer Experience - Add extensive debugging and troubleshooting tools - Create comprehensive test data seeding scripts - Implement proper error handling and logging - Establish consistent code patterns and standards ### 📊 Performance & Optimization - Optimize database queries and caching strategies - Improve asset loading and script management - Enhance template rendering performance - Streamline user experience across all interfaces 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
119 lines
No EOL
4.4 KiB
JavaScript
119 lines
No EOL
4.4 KiB
JavaScript
const { chromium } = require('playwright');
|
|
|
|
console.log('🗺️ TRAINER MARKERS VERIFICATION');
|
|
console.log('==============================');
|
|
|
|
const BASE_URL = process.env.BASE_URL || 'https://upskill-staging.measurequick.com';
|
|
|
|
(async () => {
|
|
let browser;
|
|
|
|
try {
|
|
browser = await chromium.launch({
|
|
headless: process.env.HEADLESS !== 'false',
|
|
timeout: 30000
|
|
});
|
|
|
|
const page = await browser.newPage();
|
|
|
|
// Monitor console for MapGeo integration logs
|
|
const mapgeoLogs = [];
|
|
page.on('console', msg => {
|
|
const text = msg.text();
|
|
if (text.includes('HVAC MapGeo') || text.includes('MapGeo Safety')) {
|
|
mapgeoLogs.push(text);
|
|
console.log(` 📋 ${text}`);
|
|
}
|
|
});
|
|
|
|
console.log('🌐 Loading Find a Trainer page...');
|
|
await page.goto(`${BASE_URL}/find-a-trainer/`);
|
|
await page.waitForLoadState('networkidle', { timeout: 20000 });
|
|
|
|
// Wait for MapGeo integration to process
|
|
console.log('\n⏳ Waiting for MapGeo integration to process...');
|
|
await page.waitForTimeout(10000);
|
|
|
|
// Check for map elements and markers
|
|
console.log('\n🔍 Checking for map elements...');
|
|
const mapElements = await page.evaluate(() => {
|
|
const elements = {
|
|
fallbackVisible: false,
|
|
mapContainers: document.querySelectorAll('.igmp-map-container, .amcharts-map, #hvac-trainer-map').length,
|
|
amchartsElements: document.querySelectorAll('[id*="amchart"], [class*="amchart"]').length,
|
|
markerElements: document.querySelectorAll('[class*="marker"], [data-trainer]').length,
|
|
interactiveElements: document.querySelectorAll('.igm-clickable, [onclick*="trainer"]').length
|
|
};
|
|
|
|
const fallback = document.getElementById('hvac-map-fallback');
|
|
if (fallback) {
|
|
const style = window.getComputedStyle(fallback);
|
|
elements.fallbackVisible = style.display !== 'none' && style.visibility !== 'hidden';
|
|
elements.fallbackContent = fallback.textContent || fallback.innerHTML;
|
|
}
|
|
|
|
return elements;
|
|
});
|
|
|
|
console.log(`Map containers found: ${mapElements.mapContainers}`);
|
|
console.log(`AmCharts elements: ${mapElements.amchartsElements}`);
|
|
console.log(`Marker elements: ${mapElements.markerElements}`);
|
|
console.log(`Interactive elements: ${mapElements.interactiveElements}`);
|
|
console.log(`Fallback visible: ${mapElements.fallbackVisible}`);
|
|
|
|
if (mapElements.fallbackVisible) {
|
|
console.log(`Fallback content: "${mapElements.fallbackContent?.substring(0, 100)}..."`);
|
|
}
|
|
|
|
// Look for PHP error logs that might indicate integration issues
|
|
console.log('\n🔧 Integration analysis...');
|
|
|
|
const hasCreationLogs = mapgeoLogs.some(log =>
|
|
log.includes('creating from trainer data') ||
|
|
log.includes('Created') && log.includes('trainer markers')
|
|
);
|
|
|
|
const hasGeocodedTrainers = mapgeoLogs.some(log =>
|
|
log.includes('geocoded trainers')
|
|
);
|
|
|
|
const hasProcessingLogs = mapgeoLogs.some(log =>
|
|
log.includes('Processing map layout modification')
|
|
);
|
|
|
|
console.log(`Integration processing: ${hasProcessingLogs ? '✅' : '❌'}`);
|
|
console.log(`Geocoded trainers detected: ${hasGeocodedTrainers ? '✅' : '❌'}`);
|
|
console.log(`Marker creation attempted: ${hasCreationLogs ? '✅' : '❌'}`);
|
|
|
|
// Summary of all collected logs
|
|
console.log('\n📊 COLLECTED LOGS');
|
|
console.log('================');
|
|
|
|
if (mapgeoLogs.length > 0) {
|
|
console.log('MapGeo Integration Activity:');
|
|
mapgeoLogs.forEach((log, i) => {
|
|
console.log(` ${i + 1}. ${log}`);
|
|
});
|
|
} else {
|
|
console.log('❌ No MapGeo integration logs detected');
|
|
}
|
|
|
|
// Final assessment
|
|
console.log('\n🎯 ASSESSMENT');
|
|
console.log('=============');
|
|
|
|
const integrationWorking = hasProcessingLogs && (hasCreationLogs || mapElements.markerElements > 0);
|
|
const fallbackWorking = mapElements.fallbackVisible;
|
|
|
|
console.log(`Integration Status: ${integrationWorking ? '✅ WORKING' : '❌ NEEDS INVESTIGATION'}`);
|
|
console.log(`Safety Fallback: ${fallbackWorking ? '✅ ACTIVE' : '❌ NOT VISIBLE'}`);
|
|
console.log(`Overall Status: ${integrationWorking || fallbackWorking ? '✅ FUNCTIONAL' : '❌ FAILED'}`);
|
|
|
|
} catch (error) {
|
|
console.error('\n💥 Error:', error.message);
|
|
} finally {
|
|
if (browser) {
|
|
await browser.close();
|
|
}
|
|
}
|
|
})(); |