|
@ -99,7 +99,7 @@ class ConfigLoader { |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
getSecurityConfig() { |
|
|
getSecurityConfig(): Record<string, unknown> { |
|
|
return { |
|
|
return { |
|
|
enableCryptoSigning: this.config.security.enableCryptoSigning, |
|
|
enableCryptoSigning: this.config.security.enableCryptoSigning, |
|
|
enableJWTGeneration: this.config.security.enableJWTGeneration, |
|
|
enableJWTGeneration: this.config.security.enableJWTGeneration, |
|
@ -455,7 +455,7 @@ class TimeSafariAndroidTestApp { |
|
|
this.log('TimeSafari Android Test app initialized with Phase 4 components'); |
|
|
this.log('TimeSafari Android Test app initialized with Phase 4 components'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private setupEventListeners() { |
|
|
private setupEventListeners(): void { |
|
|
// Original test functionality
|
|
|
// Original test functionality
|
|
|
document.getElementById('configure')?.addEventListener('click', () => this.testConfigure()); |
|
|
document.getElementById('configure')?.addEventListener('click', () => this.testConfigure()); |
|
|
document.getElementById('schedule')?.addEventListener('click', () => this.testSchedule()); |
|
|
document.getElementById('schedule')?.addEventListener('click', () => this.testSchedule()); |
|
@ -639,7 +639,7 @@ class TimeSafariAndroidTestApp { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private async testConfigure() { |
|
|
private async testConfigure(): Promise<void> { |
|
|
try { |
|
|
try { |
|
|
this.log('Testing TimeSafari configuration...'); |
|
|
this.log('Testing TimeSafari configuration...'); |
|
|
await this.configLoader.loadConfig(); |
|
|
await this.configLoader.loadConfig(); |
|
@ -658,7 +658,7 @@ class TimeSafariAndroidTestApp { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private async testSchedule() { |
|
|
private async testSchedule(): Promise<void> { |
|
|
try { |
|
|
try { |
|
|
this.log('Testing TimeSafari community notification scheduling...'); |
|
|
this.log('Testing TimeSafari community notification scheduling...'); |
|
|
const config = this.configLoader.getConfig(); |
|
|
const config = this.configLoader.getConfig(); |
|
@ -674,11 +674,11 @@ class TimeSafariAndroidTestApp { |
|
|
retryAttempts: 3, |
|
|
retryAttempts: 3, |
|
|
retryDelay: 5000, |
|
|
retryDelay: 5000, |
|
|
callbacks: { |
|
|
callbacks: { |
|
|
onSuccess: async (data: Record<string, unknown>) => { |
|
|
onSuccess: async (data: Record<string, unknown>): Promise<void> => { |
|
|
this.log('✅ Content fetch successful', data); |
|
|
this.log('✅ Content fetch successful', data); |
|
|
await this.processEndorserNotificationBundle(data); |
|
|
await this.processEndorserNotificationBundle(data); |
|
|
}, |
|
|
}, |
|
|
onError: async (error: Record<string, unknown>) => { |
|
|
onError: async (error: Record<string, unknown>): Promise<void> => { |
|
|
this.log('❌ Content fetch failed', error); |
|
|
this.log('❌ Content fetch failed', error); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -714,7 +714,7 @@ class TimeSafariAndroidTestApp { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private async testEndorserAPI() { |
|
|
private async testEndorserAPI(): Promise<void> { |
|
|
try { |
|
|
try { |
|
|
this.log('Testing Endorser.ch API integration...'); |
|
|
this.log('Testing Endorser.ch API integration...'); |
|
|
const config = this.configLoader.getConfig(); |
|
|
const config = this.configLoader.getConfig(); |
|
@ -763,7 +763,7 @@ class TimeSafariAndroidTestApp { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private async testCallbacks() { |
|
|
private async testCallbacks(): Promise<void> { |
|
|
try { |
|
|
try { |
|
|
this.log('Testing TimeSafari notification callbacks...'); |
|
|
this.log('Testing TimeSafari notification callbacks...'); |
|
|
// const config = this.configLoader.getConfig();
|
|
|
// const config = this.configLoader.getConfig();
|
|
@ -799,7 +799,7 @@ class TimeSafariAndroidTestApp { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private async testStatus() { |
|
|
private async testStatus(): Promise<void> { |
|
|
try { |
|
|
try { |
|
|
this.log('Testing notification status...'); |
|
|
this.log('Testing notification status...'); |
|
|
const status = await this.notificationService.getDualScheduleStatus(); |
|
|
const status = await this.notificationService.getDualScheduleStatus(); |
|
@ -810,7 +810,7 @@ class TimeSafariAndroidTestApp { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private async testPerformance() { |
|
|
private async testPerformance(): Promise<void> { |
|
|
try { |
|
|
try { |
|
|
this.log('Testing Android performance metrics...'); |
|
|
this.log('Testing Android performance metrics...'); |
|
|
const metrics = { |
|
|
const metrics = { |
|
|