## 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>
78 lines
No EOL
4.2 KiB
JavaScript
Executable file
78 lines
No EOL
4.2 KiB
JavaScript
Executable file
#!/usr/bin/env node
|
|
|
|
const { chromium } = require('playwright');
|
|
|
|
(async () => {
|
|
console.log('🔍 Testing Master Trainer Content Display...');
|
|
|
|
const browser = await chromium.launch({
|
|
headless: true,
|
|
args: ['--no-sandbox', '--disable-setuid-sandbox']
|
|
});
|
|
|
|
const page = await browser.newPage();
|
|
|
|
try {
|
|
// Login as master trainer
|
|
console.log('📝 Logging in as master trainer...');
|
|
await page.goto('https://upskill-staging.measurequick.com/training-login/');
|
|
await page.waitForSelector('input[name="log"]', { timeout: 10000 });
|
|
await page.fill('input[name="log"]', 'JoeMedosch@gmail.com');
|
|
await page.fill('input[name="pwd"]', 'JoeTrainer2025@');
|
|
await page.click('input[name="wp-submit"]');
|
|
await page.waitForLoadState('networkidle');
|
|
|
|
// Test All Trainers page
|
|
console.log('🧑🏫 Testing All Trainers page...');
|
|
await page.goto('https://upskill-staging.measurequick.com/master-trainer/all-trainers/');
|
|
await page.waitForSelector('.hvac-master-trainers-content', { timeout: 5000 });
|
|
|
|
const trainersContent = await page.textContent('.hvac-master-trainers-content');
|
|
console.log('All Trainers Content Preview:', trainersContent.substring(0, 200) + '...');
|
|
|
|
const hasTrainersList = await page.locator('.hvac-trainers-grid, .hvac-trainers-list, table').count() > 0;
|
|
console.log(hasTrainersList ? '✅ All Trainers page has content' : '❌ All Trainers page missing content');
|
|
|
|
// Test Events Overview page
|
|
console.log('📅 Testing Events Overview page...');
|
|
await page.goto('https://upskill-staging.measurequick.com/master-trainer/events-overview/');
|
|
await page.waitForSelector('.hvac-master-events-content', { timeout: 5000 });
|
|
|
|
const eventsContent = await page.textContent('.hvac-master-events-content');
|
|
console.log('Events Overview Content Preview:', eventsContent.substring(0, 200) + '...');
|
|
|
|
const hasEventsKPIs = await page.locator('.hvac-kpi-card, .hvac-event-kpi, .kpi-summary').count() > 0;
|
|
console.log(hasEventsKPIs ? '✅ Events Overview page has content' : '❌ Events Overview page missing content');
|
|
|
|
// Test Pending Approvals page
|
|
console.log('⏳ Testing Pending Approvals page...');
|
|
await page.goto('https://upskill-staging.measurequick.com/master-trainer/pending-approvals/');
|
|
await page.waitForSelector('.hvac-master-pending-approvals-page', { timeout: 5000 });
|
|
|
|
const approvalsContent = await page.textContent('.container');
|
|
console.log('Pending Approvals Content Preview:', approvalsContent.substring(0, 200) + '...');
|
|
|
|
const hasPendingApprovals = await page.locator('.hvac-approval-item, .pending-approval, .approval-queue').count() > 0;
|
|
const hasEmptyState = approvalsContent.includes('No pending approvals') || approvalsContent.includes('no pending');
|
|
console.log((hasPendingApprovals || hasEmptyState) ? '✅ Pending Approvals page has content' : '❌ Pending Approvals page missing content');
|
|
|
|
// Test Announcements page
|
|
console.log('📢 Testing Announcements page...');
|
|
await page.goto('https://upskill-staging.measurequick.com/master-trainer/announcements/');
|
|
await page.waitForSelector('.hvac-master-announcements-page', { timeout: 5000 });
|
|
|
|
const announcementsContent = await page.textContent('.announcements-content');
|
|
console.log('Announcements Content Preview:', announcementsContent.substring(0, 200) + '...');
|
|
|
|
const hasAnnouncements = await page.locator('.hvac-announcement, .announcement-item, .timeline-item').count() > 0;
|
|
const hasAnnouncementSystem = announcementsContent.includes('announcement') || announcementsContent.includes('timeline');
|
|
console.log((hasAnnouncements || hasAnnouncementSystem) ? '✅ Announcements page has content' : '❌ Announcements page missing content');
|
|
|
|
console.log('\n🎉 Master Trainer Content Test Complete!');
|
|
|
|
} catch (error) {
|
|
console.error('❌ Test failed:', error.message);
|
|
} finally {
|
|
await browser.close();
|
|
}
|
|
})(); |