upskill-event-manager/wordpress-dev/tests/e2e/utils/Config.ts
bengizmo 5d08f8d28e docs: Update certificate testing documentation and methodology
This commit:
- Creates comprehensive CERTIFICATE_TESTING_GUIDE.md to document certificate testing
- Updates TRAINER_JOURNEY_TEST_SUMMARY.md to include certificate functionality
- Updates main README.md with certificate testing information
- Creates a centralized Config.ts utility for consistent configuration
- Updates CertificatePage.ts and other page objects for consistency
- Creates a guided manual test script (run-certificate-tests.sh)
- Archives outdated certificate test files
- Improves documentation organization and consistency
2025-05-20 23:10:19 -03:00

60 lines
No EOL
1.3 KiB
TypeScript

/**
* Centralized configuration for tests
* This file provides a single source of truth for environment variables and configuration
*/
export class Config {
// URLs
static get stagingUrl(): string {
return process.env.UPSKILL_STAGING_URL || 'https://wordpress-974670-5399585.cloudwaysapps.com';
}
static get loginUrl(): string {
return `${this.stagingUrl}/community-login/`;
}
static get dashboardUrl(): string {
return `${this.stagingUrl}/hvac-dashboard/`;
}
static get generateCertificatesUrl(): string {
return `${this.stagingUrl}/generate-certificates/`;
}
static get certificateReportsUrl(): string {
return `${this.stagingUrl}/certificate-reports/`;
}
static get createEventUrl(): string {
return `${this.stagingUrl}/manage-event/`;
}
// Test credentials
static get testTrainer(): { username: string; password: string } {
return {
username: 'test_trainer',
password: 'Test123!',
};
}
// UI wait times
static get defaultTimeout(): number {
return 5000;
}
static get shortWait(): number {
return 1000;
}
static get mediumWait(): number {
return 2000;
}
static get longWait(): number {
return 5000;
}
// Screenshot settings
static get screenshotPath(): string {
return 'test-results/screenshots';
}
}