Skip to main content
Glama
test-corrected-jwt.js3.14 kB
#!/usr/bin/env node /** * TASK-001: Test Corrected JWT Token Implementation * Test the composition lifecycle with the corrected JWT token */ import { ComposerClient } from './dist/lib/composition-lifecycle.js'; async function testCorrectedJWT() { console.log('🔧 TASK-001: Testing Corrected JWT Token Implementation\n'); const client = new ComposerClient(); try { console.log('1️⃣ Initializing browser with corrected configuration...'); await client.initialize(); console.log('2️⃣ Navigating to Composer with corrected JWT...'); await client.navigateToComposer(); console.log('3️⃣ Testing "NOVA COMPOSIÇÃO" button functionality...'); const result = await client.createNewComposition(); console.log('\n🎯 TASK-001 Test Results:'); console.log(`✅ Success: ${result.success}`); console.log(`📝 Message: ${result.message}`); if (result.compositionId) { console.log(`🆔 Composition ID: ${result.compositionId}`); } if (result.success) { console.log('\n🎉 TASK-001 COMPLETE: Corrected JWT token working!'); console.log(' ✅ Browser automation working'); console.log(' ✅ Composer loading correctly'); console.log(' ✅ NOVA COMPOSIÇÃO button clickable'); console.log('\n🏆 75% tool functionality achieved!'); // Test metadata editing functionality console.log('\n4️⃣ Testing metadata editing...'); const metadataResult = await client.editCompositionMetadata({ title: 'Test Composition', description: 'Testing the corrected JWT implementation', author: 'Claude Code' }); console.log(`📝 Metadata edit: ${metadataResult.success ? '✅ Success' : '❌ Failed'}`); console.log(` Message: ${metadataResult.message}`); // Test save functionality console.log('\n5️⃣ Testing save functionality...'); const saveResult = await client.saveComposition(); console.log(`💾 Save: ${saveResult.success ? '✅ Success' : '❌ Failed'}`); console.log(` Message: ${saveResult.message}`); if (saveResult.compositionURL) { console.log(` URL: ${saveResult.compositionURL.substring(0, 80)}...`); } } else { console.log('\n❌ Issues still remain:'); console.log(` Problem: ${result.message}`); } console.log('\n👀 Browser remains open for inspection'); console.log(' Press Ctrl+C when done'); // Keep browser open for inspection await new Promise(() => {}); } catch (error) { console.error('❌ Test failed:', error.message); // Take error screenshot if possible if (client.page) { try { await client.page.screenshot({ path: `test-error-${Date.now()}.png`, fullPage: true }); console.log('📸 Error screenshot saved'); } catch (screenshotError) { console.log('Could not save error screenshot'); } } } finally { // Cleanup is handled by Ctrl+C } } testCorrectedJWT().catch(console.error);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rkm097git/euconquisto-composer-mcp-poc'

If you have feedback or need assistance with the MCP directory API, please join our Discord server