-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-export-fix.js
More file actions
69 lines (57 loc) · 2.19 KB
/
test-export-fix.js
File metadata and controls
69 lines (57 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/env node
/**
* Test Export Fix - Überprüft ob Notion und Miro Export funktionieren
*/
// Lade .env Umgebungsvariablen
require('dotenv').config();
const { exportToNotion } = require('./src/integrations/notion-export');
const { exportToMiro } = require('./src/integrations/miro-export');
async function testExportFunctions() {
console.log("🧪 Testing Export Functions Fix...");
console.log("=" .repeat(50));
const testSummary = "Test-Zusammenfassung für Otto Live Session";
const testTitle = `Otto Live Test - ${new Date().toLocaleString().replace(/[/:]/g, '')}`;
const testTranscript = "Das ist ein Test-Transkript für die Live-Session. Es enthält verschiedene Inhalte und Entitäten.";
// Test Notion Export
console.log("\n📝 Testing Notion Export...");
try {
const notionResult = await exportToNotion(testSummary, testTitle, {
templateType: 'live-session'
});
if (notionResult) {
console.log("✅ Notion Export erfolgreich!");
console.log(`🔗 Notion URL: ${notionResult}`);
} else {
console.log("⚠️ Notion Export keine Daten (API-Keys fehlen?)");
}
} catch (error) {
console.log("❌ Notion Export Fehler:", error.message);
}
// Test Miro Export
console.log("\n🎨 Testing Miro Export...");
try {
const miroResult = await exportToMiro(testTranscript, testSummary, {
useOptimizedLayout: true,
meetingType: 'Live Session Test'
});
if (miroResult) {
console.log("✅ Miro Export erfolgreich!");
console.log(`🔗 Miro URL: ${miroResult}`);
} else {
console.log("⚠️ Miro Export keine Daten (API-Keys fehlen?)");
}
} catch (error) {
console.log("❌ Miro Export Fehler:", error.message);
}
console.log("\n" + "=" .repeat(50));
console.log("🔧 Export Function Test Complete");
console.log("\nℹ️ Falls API-Keys fehlen:");
console.log(" 1. config.json bearbeiten");
console.log(" 2. NOTION_API_KEY und NOTION_DATABASE_ID hinzufügen");
console.log(" 3. MIRO_API_TOKEN hinzufügen");
}
// Run test if called directly
if (require.main === module) {
testExportFunctions().catch(console.error);
}
module.exports = { testExportFunctions };