// wordpress-dev/tests/e2e/data/personas.ts export interface Persona { // Core User Fields firstName: string; lastName: string; email: string; // Will be made unique per test run if needed password?: string; // Store common password or generate per test displayName: string; website?: string; // user_url linkedin?: string; // user_linkedin accreditation?: string; // personal_accreditation bio?: string; // description // profileImage?: string; // File upload - handle separately in tests // Business Fields (also mapped to Organizer) businessName: string; businessPhone: string; // phone businessEmail: string; // business_email (can differ from user_email) businessWebsite?: string; // business_website businessDescription?: string; // business_description // Address Fields country: 'Canada' | 'United States' | string; // user_country stateProvince: string; // user_state (or user_state_other) city: string; // user_city postalCode: string; // user_zip // Training Info Fields createVenue: 'Yes' | 'No'; // create_venue businessType: 'Manufacturer' | 'Distributor' | 'Contractor' | 'Consultant' | 'Educator' | 'Government' | 'Other'; // business_type trainingAudience: string[]; // training_audience[] trainingFormats: string[]; // training_formats[] trainingLocations: string[]; // training_locations[] trainingResources: string[]; // training_resources[] // Application Fields applicationDetails: string; annualRevenueTarget?: number; // annual_revenue_target } // Common password for simplicity in testing const COMMON_PASSWORD = 'Password123!'; export const personas: Persona[] = [ // 1. Canadian Instructor { firstName: 'Jean-Luc', lastName: 'Tremblay', email: 'jeanluc.tremblay.{timestamp}@example.ca', // Use timestamp placeholder password: COMMON_PASSWORD, displayName: 'JL Tremblay Training', website: 'https://jltremblay.example.ca', linkedin: 'https://linkedin.com/in/jltremblay', accreditation: 'HRAI, TECA', bio: 'Experienced HVAC instructor based in Quebec, specializing in heat pump technology.', businessName: 'Tremblay HVAC Training Inc.', businessPhone: '514-555-1234', businessEmail: 'info@tremblayhvactraining.example.ca', businessWebsite: 'https://tremblayhvactraining.example.ca', businessDescription: 'Providing top-notch HVAC training across Eastern Canada.', country: 'Canada', stateProvince: 'Quebec', // Will select from dropdown city: 'Montreal', postalCode: 'H3B 2T9', createVenue: 'Yes', businessType: 'Educator', trainingAudience: ['Industry professionals', 'Registered students'], trainingFormats: ['In-person', 'Virtual'], trainingLocations: ['Online', 'Regional Travel'], trainingResources: ['Classroom', 'Training Lab', 'Ducted Heat Pump(s)', 'Presentation Slides'], applicationDetails: 'Looking to expand my training reach through the Upskill HVAC platform.', annualRevenueTarget: 50000, }, // 2. US Instructor 1 { firstName: 'Alice', lastName: 'Johnson', email: 'alice.johnson.{timestamp}@example.com', // Use timestamp placeholder password: COMMON_PASSWORD, displayName: 'Alice J HVAC', website: 'https://alicehvac.example.com', linkedin: '', accreditation: 'NATE, EPA 608', bio: 'Certified HVAC technician and instructor with 15 years of field experience.', businessName: 'Johnson Technical Training', businessPhone: '555-111-2222', businessEmail: 'contact@johnsontech.example.com', businessWebsite: 'https://johnsontech.example.com', businessDescription: 'Hands-on HVAC training for new technicians in the Midwest.', country: 'United States', stateProvince: 'Illinois', // Will select from dropdown city: 'Chicago', postalCode: '60606', createVenue: 'No', businessType: 'Contractor', trainingAudience: ['Industry professionals'], trainingFormats: ['In-person', 'Hybrid'], trainingLocations: ['Local', 'Regional Travel'], trainingResources: ['Training Lab', 'Ducted Furnace(s)', 'Ducted Air Conditioner(s)', 'Training Manuals'], applicationDetails: 'Aiming to provide practical skills training via Upskill HVAC.', annualRevenueTarget: 75000, }, // 3. US Instructor 2 { firstName: 'Bob', lastName: 'Smith', email: 'bob.smith.{timestamp}@example.com', // Use timestamp placeholder password: COMMON_PASSWORD, displayName: 'Bob Smith Consulting', website: '', linkedin: 'https://linkedin.com/in/bobsmithhvac', accreditation: 'CEM', bio: 'HVAC consultant focusing on energy efficiency and commercial systems.', businessName: 'Smith Energy Consulting LLC', businessPhone: '555-999-8888', businessEmail: 'bob@smithenergy.example.com', businessWebsite: 'https://smithenergy.example.com', businessDescription: 'Consulting and training services for commercial HVAC optimization.', country: 'United States', stateProvince: 'California', // Will select from dropdown city: 'Los Angeles', postalCode: '90012', createVenue: 'No', businessType: 'Consultant', trainingAudience: ['Industry professionals', 'Anyone (open to the public)'], trainingFormats: ['Virtual', 'On-demand'], trainingLocations: ['Online', 'National Travel'], trainingResources: ['Presentation Slides', 'LMS Platform / SCORM Files', 'Custom Curriculum'], applicationDetails: 'Want to offer specialized online courses through Upskill HVAC.', // annualRevenueTarget: undefined, // Optional field left out }, ]; /** * Utility function to get a persona object with a unique email. * Replaces {timestamp} with Date.now(). */ export function getUniquePersona(personaTemplate: Persona): Persona { const uniquePersona = JSON.parse(JSON.stringify(personaTemplate)); // Deep clone const timestamp = Date.now(); uniquePersona.email = personaTemplate.email.replace('{timestamp}', timestamp.toString()); // Optionally make business email unique too if needed for testing // uniquePersona.businessEmail = personaTemplate.businessEmail.replace('{timestamp}', timestamp.toString()); return uniquePersona; }