- Add HVAC_Test_User_Factory class with: * User creation with specific roles * Multiple role support * Persona management system * Account cleanup integration - Create comprehensive test suite in HVAC_Test_User_Factory_Test.php - Update testing improvement plan documentation - Add implementation decisions to project memory bank - Restructure .gitignore with: * Whitelist approach for better file management * Explicit backup exclusions * Specific bin directory inclusions Part of the Account Management component from the testing framework improvement plan.
147 lines
No EOL
4.2 KiB
TypeScript
147 lines
No EOL
4.2 KiB
TypeScript
import { UserPersona } from '../../types';
|
|
|
|
export const testPersonas: Record<string, UserPersona> = {
|
|
canadaTrainer1: {
|
|
username: 'canadatrainer1',
|
|
email: 'trainer1@hvac.ca',
|
|
password: 'TestPass123!',
|
|
firstName: 'Jean',
|
|
lastName: 'Dubois',
|
|
businessName: 'Canadian HVAC Training Ltd',
|
|
businessType: 'Training Institution',
|
|
location: {
|
|
address: '123 Maple Street',
|
|
city: 'Toronto',
|
|
state: 'ON',
|
|
country: 'Canada',
|
|
postalCode: 'M5V 2T6'
|
|
},
|
|
role: 'trainer'
|
|
},
|
|
canadaTrainer2: {
|
|
username: 'canadatrainer2',
|
|
email: 'trainer2@hvac.ca',
|
|
password: 'TestPass123!',
|
|
firstName: 'Sarah',
|
|
lastName: 'Thompson',
|
|
businessName: 'Thompson HVAC Education',
|
|
businessType: 'Independent Trainer',
|
|
location: {
|
|
address: '456 Oak Avenue',
|
|
city: 'Vancouver',
|
|
state: 'BC',
|
|
country: 'Canada',
|
|
postalCode: 'V6B 1S4'
|
|
},
|
|
role: 'trainer'
|
|
},
|
|
usTrainer1: {
|
|
username: 'ustrainer1',
|
|
email: 'trainer1@hvac.us',
|
|
password: 'TestPass123!',
|
|
firstName: 'Michael',
|
|
lastName: 'Johnson',
|
|
businessName: 'Johnson HVAC Academy',
|
|
businessType: 'Training Center',
|
|
location: {
|
|
address: '789 Pine Road',
|
|
city: 'Boston',
|
|
state: 'MA',
|
|
country: 'USA',
|
|
postalCode: '02108'
|
|
},
|
|
role: 'trainer'
|
|
},
|
|
usTrainer2: {
|
|
username: 'ustrainer2',
|
|
email: 'trainer2@hvac.us',
|
|
password: 'TestPass123!',
|
|
firstName: 'Lisa',
|
|
lastName: 'Martinez',
|
|
businessName: 'Southwest HVAC Training',
|
|
businessType: 'Training Institution',
|
|
location: {
|
|
address: '321 Desert Drive',
|
|
city: 'Phoenix',
|
|
state: 'AZ',
|
|
country: 'USA',
|
|
postalCode: '85001'
|
|
},
|
|
role: 'trainer'
|
|
},
|
|
usTrainer3: {
|
|
username: 'ustrainer3',
|
|
email: 'trainer3@hvac.us',
|
|
password: 'TestPass123!',
|
|
firstName: 'Robert',
|
|
lastName: 'Wilson',
|
|
businessName: 'Wilson HVAC Solutions',
|
|
businessType: 'Independent Trainer',
|
|
location: {
|
|
address: '654 Beach Blvd',
|
|
city: 'Miami',
|
|
state: 'FL',
|
|
country: 'USA',
|
|
postalCode: '33101'
|
|
},
|
|
role: 'trainer'
|
|
},
|
|
intlTrainer1: {
|
|
username: 'intltrainer1',
|
|
email: 'trainer@hvac.uk',
|
|
password: 'TestPass123!',
|
|
firstName: 'James',
|
|
lastName: 'Smith',
|
|
businessName: 'Global HVAC Training',
|
|
businessType: 'International Training Center',
|
|
location: {
|
|
address: '10 Westminster Road',
|
|
city: 'London',
|
|
state: '',
|
|
country: 'UK',
|
|
postalCode: 'SW1A 1AA'
|
|
},
|
|
role: 'trainer'
|
|
},
|
|
pendingTrainer: {
|
|
username: 'pendingtrainer',
|
|
email: 'pending@hvac.test',
|
|
password: 'TestPass123!',
|
|
firstName: 'Alex',
|
|
lastName: 'Pending',
|
|
businessName: 'Pending HVAC Training',
|
|
businessType: 'Training Center',
|
|
location: {
|
|
address: '100 Test Street',
|
|
city: 'TestCity',
|
|
state: 'TS',
|
|
country: 'USA',
|
|
postalCode: '12345'
|
|
},
|
|
role: 'trainer',
|
|
specialAttributes: {
|
|
isPending: true
|
|
}
|
|
},
|
|
subscriberUser: {
|
|
username: 'subscriber1',
|
|
email: 'subscriber@hvac.test',
|
|
password: 'TestPass123!',
|
|
firstName: 'Sam',
|
|
lastName: 'Subscriber',
|
|
location: {
|
|
address: '200 User Lane',
|
|
city: 'UserCity',
|
|
state: 'UC',
|
|
country: 'USA',
|
|
postalCode: '54321'
|
|
},
|
|
role: 'subscriber',
|
|
specialAttributes: {
|
|
isSubscriber: true
|
|
}
|
|
}
|
|
};
|
|
|
|
export const roles = ['trainer', 'subscriber', 'administrator'];
|
|
export const businessTypes = ['Training Institution', 'Independent Trainer', 'Training Center', 'International Training Center']; |