upskill-event-manager/wordpress-dev/tests/e2e
bengizmo c15d2a3923 fix: Resolve 5 critical bugs in certificate management and navigation system
- Fix Certificate Reports page to properly display certificates with statistics and filtering
- Fix Generate Certificates page to load attendees correctly and resolve PHP errors
- Fix Create Event page to properly detect and use TEC Community Events shortcode
- Remove all My Events navigation links and replace with Certificate Reports links
- Fix help system by removing duplicate navigation elements
- Add comprehensive E2E test suite to verify all fixes and prevent regressions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-23 18:53:03 -03:00
..
archived docs: Update certificate testing documentation and methodology 2025-05-20 23:10:19 -03:00
data docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
docs feat: Harmonize Playwright testing capabilities 2025-05-21 10:33:48 -03:00
pages fix: Update login form selectors to match actual page structure 2025-05-21 20:21:16 -03:00
test-plan test: Enhance trainer journey with certificate functionality 2025-05-21 10:07:35 -03:00
utils refactor: Complete E2E test debugging and improvements 2025-05-23 15:03:15 -03:00
certificate-basic.spec.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
certificate-basic.test.ts refactor: Complete E2E test debugging and improvements 2025-05-23 15:03:15 -03:00
certificate-core.test.ts refactor: Complete E2E test debugging and improvements 2025-05-23 15:03:15 -03:00
certificate-edge-cases.test.ts refactor: Consolidate E2E test suite from 85+ to focused structure 2025-05-23 14:39:52 -03:00
certificate-management.test.ts refactor: Consolidate E2E test suite from 85+ to focused structure 2025-05-23 14:39:52 -03:00
certificate-optimized.test.ts feat: Complete E2E test consolidation with fully working test suite 2025-05-23 16:02:58 -03:00
certificate-test-clean.spec.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
CERTIFICATE_TESTING_GUIDE.md docs: Update certificate testing documentation and methodology 2025-05-20 23:10:19 -03:00
certificates.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
check-dashboard-elements.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
check-dashboard-stats.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
check-page-contents.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
COMMIT_MESSAGE.md docs: Update certificate testing documentation and methodology 2025-05-20 23:10:19 -03:00
create-event.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
critical-error-investigation.test.ts Fix PHP compatibility issues causing dashboard 500 errors 2025-05-22 20:25:31 -03:00
dashboard-filter.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
dashboard-final-check.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
dashboard-improvements.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
dashboard-layout.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
dashboard-screenshot.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
dashboard-stats.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
dashboard.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
debug-login-page.spec.ts fix: Update login form selectors to match actual page structure 2025-05-21 20:21:16 -03:00
domain-verification-basic.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
email-attendees.test.ts feat: Add Email Attendees functionality (Phase 2) 2025-05-20 10:33:03 -03:00
event-creation-api.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
event-creation-complete.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
event-creation-final.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
event-creation-fixed-validation.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
event-creation-fixed.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
event-creation-manage.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
event-creation-no-cache.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
event-creation-tinymce.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
event-creation-trainer.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
event-creation-with-cache-clear.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
event-creation-with-fix.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
event-creation-working.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
event-debug-final.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
event-submission-fix.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
event-summary-detailed.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
event-summary.spec.ts test: Improve Event Summary authentication tests 2025-05-20 09:28:49 -03:00
final-dashboard-test.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
final-dashboard-verification.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
final-deployment-verification.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
final-working-tests.test.ts feat: Complete E2E test consolidation with fully working test suite 2025-05-23 16:02:58 -03:00
final-zoho-verification.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
find-event-form.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
global-setup.ts feat(testing): Implement comprehensive trainer journey test suite with Page Object Model 2025-05-18 15:42:00 -03:00
global-teardown.ts feat(testing): Implement comprehensive trainer journey test suite with Page Object Model 2025-05-18 15:42:00 -03:00
help-system-documentation.test.ts test: Add comprehensive E2E tests for help system 2025-05-22 09:03:37 -03:00
help-system-integration.test.ts test: Add comprehensive E2E tests for help system 2025-05-22 09:03:37 -03:00
help-system-tooltips.test.ts test: Add comprehensive E2E tests for help system 2025-05-22 09:03:37 -03:00
help-system-welcome-guide.test.ts test: Add comprehensive E2E tests for help system 2025-05-22 09:03:37 -03:00
homepage.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
inspect-form-fields.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
investigate-form-submission.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
login-and-dashboard-test.test.ts Fix PHP compatibility issues causing dashboard 500 errors 2025-05-22 20:25:31 -03:00
login-test.spec.ts fix: Update login form selectors to match actual page structure 2025-05-21 20:21:16 -03:00
login-troubleshooting.test.ts feat: Add deployment utilities and login troubleshooting test 2025-05-22 00:09:48 -03:00
login.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
manual-dashboard-check.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
mobile-responsiveness-simple.test.ts feat: Add comprehensive UX enhancements for mobile and desktop 2025-05-23 16:41:01 -03:00
mobile-responsiveness.test.ts feat: Add comprehensive UX enhancements for mobile and desktop 2025-05-23 16:41:01 -03:00
optimized-certificate-tests.ts test: Optimize E2E testing infrastructure for certificates 2025-05-21 09:45:00 -03:00
order-summary.test.ts feat: Implement Order Summary page functionality 2025-05-20 09:56:28 -03:00
page-rendering-verification.test.ts fix: Correct template path for dashboard shortcode 2025-05-20 10:41:18 -03:00
page-ui-elements.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
page-verification-report.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
playwright.config.ts feat(testing): Implement comprehensive trainer journey test suite with Page Object Model 2025-05-18 15:42:00 -03:00
plugin-functionality-comprehensive.test.ts fix: Resolve 5 critical bugs in certificate management and navigation system 2025-05-23 18:53:03 -03:00
profile-verification.spec.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
README.md feat: Harmonize Playwright testing capabilities 2025-05-21 10:33:48 -03:00
registration.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
staging-plugin-investigation.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
test-admin-dashboard.test.ts Fix PHP compatibility issues causing dashboard 500 errors 2025-05-22 20:25:31 -03:00
test-event-with-venue-organizer.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
test-installer-deployment.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
test-modify-draft-events.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
test-modify-event.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
test-modify-events-my-events.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
test-refactored-dashboard.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
test-wp-admin-login.test.ts Fix dashboard data inconsistency and enhance test suite with WP API 2025-05-22 19:24:18 -03:00
test-zoho-admin-interface.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
test-zoho-connection.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
TESTING-STRATEGY.md docs: Update testing documentation and add deployment resilience scripts 2025-05-21 20:37:32 -03:00
trainer-journey-basic.test.ts refactor: Complete E2E test debugging and improvements 2025-05-23 15:03:15 -03:00
trainer-journey-final.test.ts refactor: Complete E2E test debugging and improvements 2025-05-23 15:03:15 -03:00
trainer-journey-harmonized.test.ts feat: Harmonize Playwright testing capabilities 2025-05-21 10:33:48 -03:00
trainer-journey-optimized.test.ts feat: Complete E2E test consolidation with fully working test suite 2025-05-23 16:02:58 -03:00
trainer-profile-edit.spec.ts feat: Add trainer profile editing functionality 2025-05-20 09:47:22 -03:00
trainer-profile-page-object.spec.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
trainer-profile.spec.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
TRAINER_JOURNEY_TEST_SUMMARY.md docs: Update certificate testing documentation and methodology 2025-05-20 23:10:19 -03:00
ui-styling-analysis.test.ts feat: Implement harmonized CSS framework with theme-based styling 2025-05-23 09:48:30 -03:00
ui-styling-review.test.ts feat: Implement harmonized CSS framework with theme-based styling 2025-05-23 09:48:30 -03:00
ux-enhancements-verification.test.ts test: Add comprehensive UX enhancements verification test suite 2025-05-23 16:50:53 -03:00
verify-certificate-data.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
verify-certificate-test-data.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
verify-dashboard-author-fix-v2.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
verify-dashboard-author-fix.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
verify-dashboard-content.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
verify-dashboard-events.spec.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
verify-dashboard-events.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
verify-dashboard-fix.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
verify-dashboard-shows-events.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
verify-field-mapping.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
verify-plugin-activation.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
verify-plugin-deployment.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
verify-plugin-status.test.ts feat: Add test user creation and plugin verification scripts 2025-05-21 20:12:38 -03:00
verify-test-events.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
working-event-creation.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00
zoho-domain-update-verification.test.ts docs: Update testing procedures in CLAUDE.md with comprehensive E2E test workflow 2025-05-21 20:12:22 -03:00

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

  1. Verify your setup:

    cd tests/e2e
    ./verify-setup.sh
    
  2. Run the trainer journey tests:

    cd ../..  # Go to wordpress-dev directory
    ./bin/run-tests.sh --trainer-journey
    
  3. 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
    
  4. 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
# 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:

  1. Login and Dashboard Access: Successfully tests trainer login and dashboard navigation
  2. 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
  3. Event Details: Views individual event pages
  4. 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

  1. Environment Setup

    • .env file with staging server credentials
    • Node.js and npm installed
    • Playwright dependencies installed
  2. Staging Server Requirements

    • Test user test_trainer exists
    • Required plugins activated
    • HVAC Community Events plugin deployed

Troubleshooting

If tests fail, check:

  1. Network Issues

    • Staging server is accessible
    • No proxy/firewall blocking
  2. Authentication Issues

    • Test user credentials are correct
    • User has proper role assigned
  3. Element Not Found

    • Page structure may have changed
    • Update selectors in page objects
  4. Certificate Generation Issues

    • Verify events have attendees
    • Check if attendees have proper check-in status
    • Review certificate storage permissions
  5. Playwright Version Conflicts

    • Check package.json to ensure Playwright is in devDependencies
    • Verify you're using version ^1.52.0
    • Run npm ci to ensure clean installation
    • Use the certificate-basic.spec.ts file which avoids test.describe()
  6. 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 --headed flag to see browser interactions

Contributing

When adding new tests:

  1. Use the Page Object Model pattern
  2. Add test data to centralized files
  3. Update documentation
  4. Follow existing naming conventions
  5. 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