upskill-event-manager/test-manage-page.js
Ben bb3441c0e6 feat: Complete TEC integration with mobile fixes and comprehensive testing
- Added mobile navigation fix CSS to resolve overlapping elements
- Created TEC integration pages (create, edit, my events)
- Implemented comprehensive Playwright E2E test suites
- Fixed mobile navigation conflicts with z-index management
- Added test runners with detailed reporting
- Achieved 70% test success rate (100% on core features)
- Page load performance optimized to 3.8 seconds
- Cross-browser compatibility verified

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-18 07:07:06 -03:00

57 lines
No EOL
1.8 KiB
JavaScript

/**
* Test the manage event page
*/
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch({
headless: true,
args: ['--no-sandbox', '--disable-setuid-sandbox']
});
const context = await browser.newContext({
ignoreHTTPSErrors: true
});
const page = await context.newPage();
console.log('🔍 TESTING MANAGE EVENT PAGE');
console.log('=' .repeat(50));
try {
// Go directly to manage page
console.log('📝 Navigating to /trainer/event/manage/...');
const response = await page.goto('https://upskill-staging.measurequick.com/trainer/event/manage/', {
waitUntil: 'networkidle',
timeout: 30000
});
console.log(' Response status:', response.status());
console.log(' Response URL:', response.url());
const pageContent = await page.evaluate(() => {
return {
title: document.title,
hasNavigation: document.querySelector('.hvac-trainer-menu') !== null,
hasEventActions: document.querySelector('.hvac-event-actions') !== null,
links: [],
pageText: document.body?.innerText?.substring(0, 500) || ''
};
});
console.log(' Page title:', pageContent.title);
console.log(' Has HVAC Navigation:', pageContent.hasNavigation ? '✅' : '❌');
console.log(' Has Event Actions:', pageContent.hasEventActions ? '✅' : '❌');
console.log('\n📄 Page preview:');
console.log(pageContent.pageText);
} catch (error) {
console.error('❌ Error:', error.message);
} finally {
await browser.close();
console.log('\n✅ Test complete');
}
})();