- Create complete integration test system (test-integration.js) - Add UI/UX interaction testing with real event simulation (test-uiux-integration.js) - Implement end-to-end scenario testing for user journeys (test-e2e-scenarios.js) - Add console testing commands for rapid development testing (test-console-commands.js) - Create comprehensive test guide documentation (TEST-GUIDE.md) - Integrate test buttons in debug panel (F12 → 3 test types) - Add vocabulary modal two-progress-bar system integration - Fix flashcard retry system for "don't know" cards - Update IntelligentSequencer for task distribution validation 🧪 Testing Coverage: - 35+ integration tests (architecture/modules) - 20+ UI/UX tests (real user interactions) - 5 E2E scenarios (complete user journeys) - Console commands for rapid testing - Debug panel integration 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
41 lines
1.5 KiB
JavaScript
41 lines
1.5 KiB
JavaScript
// Debug _callProvider method
|
|
import { default as IAEngine } from './src/DRS/services/IAEngine.js';
|
|
|
|
class DebugIAEngine extends IAEngine {
|
|
async _callProvider(provider, prompt, options) {
|
|
console.log(`🔍 _callProvider called with provider: ${provider}`);
|
|
console.log(`🔍 apiKeys exists: ${!!this.apiKeys}`);
|
|
console.log(`🔍 apiKeys.mock: ${this.apiKeys?.mock}`);
|
|
|
|
if (this.apiKeys) {
|
|
console.log(`🔍 Available keys: ${Object.keys(this.apiKeys)}`);
|
|
const keyName = `${provider.toUpperCase()}_API_KEY`;
|
|
console.log(`🔍 Looking for key: ${keyName}`);
|
|
console.log(`🔍 Key exists: ${!!this.apiKeys[keyName]}`);
|
|
if (this.apiKeys[keyName]) {
|
|
console.log(`🔍 Key preview: ${this.apiKeys[keyName].substring(0, 15)}...`);
|
|
}
|
|
}
|
|
|
|
return super._callProvider(provider, prompt, options);
|
|
}
|
|
}
|
|
|
|
async function debugCallProvider() {
|
|
console.log('🔧 Debugging _callProvider method...');
|
|
|
|
const engine = new DebugIAEngine();
|
|
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
|
|
try {
|
|
console.log('\n🧪 Testing DeepSeek call...');
|
|
const result = await engine.validateEducationalContent('Test', {
|
|
preferredProvider: 'deepseek'
|
|
});
|
|
console.log('✅ Success! Provider:', result.provider);
|
|
} catch (error) {
|
|
console.log('❌ Failed:', error.message);
|
|
}
|
|
}
|
|
|
|
debugCallProvider().catch(console.error); |