- Create HVAC_Communication_Templates class for managing email templates - Add template post type with categories and placeholders - Implement AJAX handlers for CRUD operations - Create responsive template management interface with modal forms - Add template manager widget for integration with email forms - Include placeholder system for dynamic content (attendee_name, event_title, etc.) - Add default templates for common scenarios (reminders, welcome, certificates) - Create template management page with category filtering - Add comprehensive E2E tests for template functionality - Integrate widget into email attendees page - Support template save/load/edit/delete operations - Include CSS styling with responsive design and accessibility features - Add JavaScript for interactive functionality and form handling 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| archived | ||
| data | ||
| docs | ||
| pages | ||
| test-plan | ||
| utils | ||
| capture-ui-screenshots.test.ts | ||
| certificate-basic.spec.ts | ||
| certificate-basic.test.ts | ||
| certificate-core.test.ts | ||
| certificate-edge-cases.test.ts | ||
| certificate-management.test.ts | ||
| certificate-optimized.test.ts | ||
| certificate-test-clean.spec.ts | ||
| CERTIFICATE_TESTING_GUIDE.md | ||
| certificates.test.ts | ||
| check-dashboard-elements.test.ts | ||
| check-dashboard-stats.test.ts | ||
| check-page-contents.test.ts | ||
| COMMIT_MESSAGE.md | ||
| communication-templates.test.ts | ||
| create-event.test.ts | ||
| critical-error-investigation.test.ts | ||
| dashboard-enhanced-features.test.ts | ||
| dashboard-filter.test.ts | ||
| dashboard-final-check.test.ts | ||
| dashboard-improvements.test.ts | ||
| dashboard-layout.test.ts | ||
| dashboard-screenshot.test.ts | ||
| dashboard-stats.test.ts | ||
| dashboard.test.ts | ||
| debug-event-creation.test.ts | ||
| debug-login-page.spec.ts | ||
| domain-verification-basic.test.ts | ||
| email-attendees.test.ts | ||
| event-creation-api.test.ts | ||
| event-creation-complete.test.ts | ||
| event-creation-final.test.ts | ||
| event-creation-fixed-validation.test.ts | ||
| event-creation-fixed.test.ts | ||
| event-creation-integration.test.ts | ||
| event-creation-manage.test.ts | ||
| event-creation-no-cache.test.ts | ||
| event-creation-tec.test.ts | ||
| event-creation-tinymce.test.ts | ||
| event-creation-trainer.test.ts | ||
| event-creation-with-cache-clear.test.ts | ||
| event-creation-with-fix.test.ts | ||
| event-creation-working.test.ts | ||
| event-debug-final.test.ts | ||
| event-submission-fix.test.ts | ||
| event-summary-detailed.test.ts | ||
| event-summary.spec.ts | ||
| final-dashboard-test.test.ts | ||
| final-dashboard-verification.test.ts | ||
| final-deployment-verification.test.ts | ||
| final-working-tests.test.ts | ||
| final-zoho-verification.test.ts | ||
| find-event-form.test.ts | ||
| global-setup.ts | ||
| global-teardown.ts | ||
| google-sheets-integration.test.ts | ||
| google-sheets-simple.test.ts | ||
| help-system-documentation.test.ts | ||
| help-system-integration.test.ts | ||
| help-system-tooltips.test.ts | ||
| help-system-welcome-guide.test.ts | ||
| homepage.test.ts | ||
| inspect-form-fields.test.ts | ||
| investigate-form-submission.test.ts | ||
| login-and-dashboard-test.test.ts | ||
| login-test.spec.ts | ||
| login-troubleshooting.test.ts | ||
| login.test.ts | ||
| manual-dashboard-check.test.ts | ||
| master-dashboard-admin.test.ts | ||
| master-dashboard-complete.test.ts | ||
| master-dashboard-debug.test.ts | ||
| master-dashboard-final-summary.test.ts | ||
| master-dashboard-master-trainer.test.ts | ||
| master-dashboard-simple.test.ts | ||
| master-dashboard-working.test.ts | ||
| master-dashboard.test.ts | ||
| mobile-responsiveness-simple.test.ts | ||
| mobile-responsiveness.test.ts | ||
| optimized-certificate-tests.ts | ||
| order-summary.test.ts | ||
| page-rendering-verification.test.ts | ||
| page-ui-elements.test.ts | ||
| page-verification-report.test.ts | ||
| playwright.config.ts | ||
| plugin-functionality-comprehensive.test.ts | ||
| profile-verification.spec.ts | ||
| README.md | ||
| registration.test.ts | ||
| staging-plugin-investigation.test.ts | ||
| tec-shortcode-check.test.ts | ||
| test-admin-dashboard.test.ts | ||
| test-event-with-venue-organizer.test.ts | ||
| test-installer-deployment.test.ts | ||
| test-manage-event-page.test.ts | ||
| test-modify-draft-events.test.ts | ||
| test-modify-event.test.ts | ||
| test-modify-events-my-events.test.ts | ||
| test-refactored-dashboard.test.ts | ||
| test-wp-admin-login.test.ts | ||
| test-zoho-admin-interface.test.ts | ||
| test-zoho-connection.test.ts | ||
| TESTING-STRATEGY.md | ||
| trainer-journey-basic.test.ts | ||
| trainer-journey-complete.test.ts | ||
| trainer-journey-final.test.ts | ||
| trainer-journey-harmonized.test.ts | ||
| trainer-journey-optimized.test.ts | ||
| trainer-profile-edit.spec.ts | ||
| trainer-profile-page-object.spec.ts | ||
| trainer-profile.spec.ts | ||
| trainer-registration-fix.test.ts | ||
| TRAINER_JOURNEY_TEST_SUMMARY.md | ||
| ui-styling-analysis.test.ts | ||
| ui-styling-review.test.ts | ||
| ux-enhancements-verification.test.ts | ||
| verify-certificate-data.test.ts | ||
| verify-certificate-test-data.test.ts | ||
| verify-dashboard-author-fix-v2.test.ts | ||
| verify-dashboard-author-fix.test.ts | ||
| verify-dashboard-content.test.ts | ||
| verify-dashboard-events.spec.ts | ||
| verify-dashboard-events.test.ts | ||
| verify-dashboard-fix.test.ts | ||
| verify-dashboard-shows-events.test.ts | ||
| verify-field-mapping.test.ts | ||
| verify-plugin-activation.test.ts | ||
| verify-plugin-deployment.test.ts | ||
| verify-plugin-status.test.ts | ||
| verify-test-events.test.ts | ||
| working-event-creation.test.ts | ||
| zoho-domain-update-verification.test.ts | ||
HVAC Community Events - E2E Tests
Trainer Journey Testing
This directory contains end-to-end tests for the complete Trainer User Journey as defined in the project requirements.
Quick Start
-
Verify your setup:
cd tests/e2e ./verify-setup.sh -
Run the trainer journey tests:
cd ../.. # Go to wordpress-dev directory ./bin/run-tests.sh --trainer-journey -
Run certificate tests:
# Using NPM scripts npm run test:basic # Run basic certificate tests npm run test:journey # Run full trainer journey with certificates npm run test:cert # Run certificate tests npm run test:cert:gen # Run certificate generation tests # Using advanced test runner ./bin/run-advanced-tests.sh # Basic certificate tests ./bin/run-advanced-tests.sh --test journey # Trainer journey ./bin/run-advanced-tests.sh --test journey --debug # With debug mode ./bin/run-advanced-tests.sh --test all # All certificate tests -
For detailed testing information:
# Read the harmonized testing documentation cat tests/e2e/docs/harmonized-testing.md
Test Coverage
The test suite covers the following trainer journey steps:
- ✅ Login & Authentication (Steps 1-2)
- ✅ Dashboard Access (Step 3)
- ✅ Event Management (Step 4)
- Create events (Step 4a)
- View event list (Step 4b)
- Modify events (Step 4c)
- Delete events (Step 4d)
- ✅ Event Details View (Step 5)
- ⏳ Event Statistics (Step 6 - In Progress)
- ⏳ Order & Attendee Details (Steps 7-8 - Pending)
- ⏳ Email Communication (Step 9 - Phase 2)
- ⏳ Attendee Check-in (Step 10)
- ✅ Certificate Generation (Step 11 - Now Implemented!)
- Generate certificates for attendees
- View and manage certificates
- Email and revoke certificates
Project Structure
tests/e2e/
├── pages/ # Page Object Model classes
│ ├── BasePage.ts
│ ├── LoginPage.ts
│ ├── DashboardPage.ts
│ ├── CreateEventPage.ts
│ ├── EventSummaryPage.ts
│ ├── ModifyEventPage.ts
│ └── CertificatePage.ts
├── utils/ # Utility classes
│ ├── Config.ts # Centralized configuration
│ └── CertificateTestData.ts # Certificate test data
├── data/ # Test data
│ ├── test-users.ts
│ └── test-events.ts
├── docs/ # Documentation
│ ├── trainer-journey-testing.md
│ └── harmonized-testing.md # NEW! Harmonized testing approach
├── test-plan/ # Test planning documents
│ └── trainer-journey-verification.md
├── trainer-journey.test.ts # Original trainer journey
├── trainer-journey-harmonized.test.ts # NEW! Harmonized trainer journey
├── certificate-basic.spec.ts # NEW! Basic certificate tests (compatible with all Playwright versions)
├── certificate-generation-checked-in.test.ts # Certificate generation tests
├── certificates.test.ts # Certificate functionality tests
├── CERTIFICATE_TESTING_GUIDE.md # Certificate testing documentation
├── verify-setup.sh # Setup verification script
└── README.md # This file
Advanced Test Infrastructure
bin/
├── run-tests.sh # Original test runner
├── run-playwright-tests.sh # Basic Playwright test runner
├── run-advanced-tests.sh # NEW! Advanced test runner with configuration options
├── setup-staging-test-users.sh # Setup test users
└── certificate-test.js # Standalone certificate test script
Running Specific Tests
Original Test Runner
# Run all E2E tests
./bin/run-tests.sh --e2e
# Run only trainer journey tests
./bin/run-tests.sh --trainer-journey
# Run specific test scenarios
./bin/run-tests.sh --e2e --grep @login
./bin/run-tests.sh --e2e --grep @dashboard
./bin/run-tests.sh --e2e --grep @create-event
# Run certificate tests (legacy method)
./bin/run-certificate-tests.sh generation
./bin/run-certificate-tests.sh reports
Harmonized Test Runner (Recommended)
# Run specific test files
npm run test:journey # Full trainer journey with certificates
npm run test:basic # Basic certificate tests
npm run test:cert # Certificate tests
npm run test:cert:gen # Certificate generation tests
# Run with debug mode
npm run test:journey:debug
# Run with UI mode
npm run test:journey:ui
# Run tests with advanced configuration
./bin/run-advanced-tests.sh --test journey --headed # With UI visible
./bin/run-advanced-tests.sh --test all --debug # All certificate tests with debug
Test Results
- Console output shows real-time test progress
- Screenshots saved in
test-results/screenshots/ - Test reports generated in
test-results/
Latest Test Summary (2025-05-21)
The trainer journey and certificate tests are now ✅ PASSING with the following coverage:
- Login and Dashboard Access: Successfully tests trainer login and dashboard navigation
- Event Management: Complete coverage of event CRUD operations:
- Create new events with all required fields
- View events in My Events page (both upcoming and past)
- Modify existing events
- Delete events with confirmation
- Event Details: Views individual event pages
- Certificate Generation: Fully implemented!
- Generate certificates for event attendees
- Manage certificates (view, email, revoke)
- Filter and paginate certificate lists
- Filter by attendee name and email
Key improvements:
- Harmonized Testing Approach: Consistent test structure that works with the latest Playwright version
- Advanced Test Runner: Simplified execution with multiple configuration options
- Improved Page Objects: Enhanced page object models with better encapsulation and reusability
- Consistent Dependencies: Fixed Playwright version conflicts in package.json
- Comprehensive Documentation: Added detailed testing documentation
Key findings:
- Events created during testing appear in My Events but not in main dashboard (application issue)
- TinyMCE editor requires special handling in tests
- Multiple fallback strategies implemented for form fields
- Certificate generation properly handles checked-in vs. non-checked-in attendees
For complete details on certificate testing, see the Certificate Testing Guide and Harmonized Testing Approach.
Prerequisites
-
Environment Setup
.envfile with staging server credentials- Node.js and npm installed
- Playwright dependencies installed
-
Staging Server Requirements
- Test user
test_trainerexists - Required plugins activated
- HVAC Community Events plugin deployed
- Test user
Troubleshooting
If tests fail, check:
-
Network Issues
- Staging server is accessible
- No proxy/firewall blocking
-
Authentication Issues
- Test user credentials are correct
- User has proper role assigned
-
Element Not Found
- Page structure may have changed
- Update selectors in page objects
-
Certificate Generation Issues
- Verify events have attendees
- Check if attendees have proper check-in status
- Review certificate storage permissions
-
Playwright Version Conflicts
- Check package.json to ensure Playwright is in devDependencies
- Verify you're using version ^1.52.0
- Run
npm cito ensure clean installation - Use the
certificate-basic.spec.tsfile which avoids test.describe()
-
Advanced Test Runner Issues
- Ensure the script is executable:
chmod +x bin/run-advanced-tests.sh - Verify your .env file has the correct credentials
- Try running with the
--headedflag to see browser interactions
- Ensure the script is executable:
Contributing
When adding new tests:
- Use the Page Object Model pattern
- Add test data to centralized files
- Update documentation
- Follow existing naming conventions
- Use the Config utility for environment variables
Support
For issues or questions:
- Check the troubleshooting guide above
- Review test output and screenshots
- Check staging server logs
- Contact the development team