upskill-event-manager/docs/EVENT-SEEDING-INSTRUCTIONS.md
Ben 023d77541c feat: Add event seeding functionality and comprehensive edit workflow tests
- Created admin page for direct event seeding (admin/seed-events-direct.php)
- Added test admin user creation script with master trainer roles
- Implemented comprehensive Playwright tests for event edit workflow
- Verified field population with TEC v5.0.8
- Confirmed 11 core fields properly populate in edit forms
- Added XWayland display configuration for headed browser testing
- Created seeding scripts that add events with complete metadata

Test Results:
- Login functionality: Working
- Event access: 20+ events accessible
- Field population: 11 essential fields confirmed
- Edit workflow: Functional with TEC Community Events

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-18 10:40:11 -03:00

3.2 KiB

Event Seeding Instructions for Staging

Quick Start

The comprehensive event seeding script has been deployed to staging. To seed events and test editing functionality:

1. SSH to Staging Server

ssh roodev@146.190.76.204
cd /home/974670.cloudwaysapps.com/uberrxmprk/public_html

2. Run the Seeding Script

wp eval-file wp-content/plugins/hvac-community-events/tools/seed-and-test-events.php

This will:

  • Create test users (test_trainer, test_master)
  • Create 2 venues (Dallas, Houston)
  • Create 2 organizers
  • Create 5 comprehensive test events
  • Display all test URLs and credentials

Test Accounts Created

Role Email Password
Trainer test_trainer@example.com TestTrainer123!
Master Trainer test_master@example.com TestMaster123!

Test Events Created

  1. HVAC System Diagnostics Workshop - Aug 20, 2025
  2. Commercial Refrigeration Fundamentals - Aug 25-26, 2025
  3. Heat Pump Installation Masterclass - Sep 5-7, 2025
  4. Indoor Air Quality Solutions - Sep 12, 2025
  5. VRF Systems Advanced Training - Sep 18-20, 2025

Testing Event Edit Functionality

Option 1: WordPress Admin (Guaranteed to Work)

  1. Login to WordPress Admin: https://upskill-staging.measurequick.com/wp-admin/
  2. Navigate to Events → All Events
  3. Click "Edit" on any event
  4. Modify fields and click "Update"

Option 2: Custom HVAC Pages (If TEC Configured)

  1. Login: https://upskill-staging.measurequick.com/training-login/
  2. Dashboard: https://upskill-staging.measurequick.com/trainer/dashboard/
  3. Events List: https://upskill-staging.measurequick.com/trainer/events/
  4. Edit Event: Click edit link from list

Option 3: TEC Community URLs (If Pages Created)

  1. My Events: https://upskill-staging.measurequick.com/community/list/
  2. Add Event: https://upskill-staging.measurequick.com/community/add/
  3. Edit Event: https://upskill-staging.measurequick.com/community/edit/[event-id]/

Troubleshooting

If Custom Pages Don't Show Forms:

The TEC Community Events plugin needs configuration:

  1. Go to Events → Settings → Community
  2. Enable "Allow users to edit their submissions"
  3. Set default status to "Published" or "Draft"
  4. Save settings

If URLs Return 404:

Flush permalinks:

wp rewrite flush

To Verify Events Were Created:

wp post list --post_type=tribe_events --format=table

Additional Seeding Scripts Available

All these scripts are in /wp-content/plugins/hvac-community-events/:

  • tools/seed-and-test-events.php - Main comprehensive seeding
  • tools/seed-events.php - Alternative seeding script
  • bin/seed-comprehensive-events.sh - Bash version (requires SSH password)

Success Indicators

After running the seeding script, you should see:

  • 5 events in the database
  • Test users can login
  • Events visible in WordPress admin
  • Edit functionality works in admin
  • Event IDs displayed for testing

Next Steps

  1. Run the seeding script as shown above
  2. Login with test credentials
  3. Navigate to event list
  4. Click edit on any event
  5. Verify all fields populate correctly
  6. Make changes and save
  7. Confirm changes persist

The system is ready for comprehensive event editing testing!