Skip to main content
Glama
test-corrected-navigation.js3.67 kB
#!/usr/bin/env node /** * Corrected Navigation Test - Using the actual corrected JWT token */ import { chromium } from 'playwright'; import fs from 'fs'; async function testCorrectedNavigation() { console.log('🔧 Testing with CORRECTED JWT token from file...'); // Read the corrected JWT token from file const token = fs.readFileSync('/Users/ricardokawasaki/Desktop/euconquisto-composer-mcp-poc/correct-jwt-new.txt', 'utf8').trim(); console.log(`✅ Token length: ${token.length} characters`); console.log(`✅ Contains NEsta: ${token.includes('NEsta')}`); console.log(`✅ Contains WEJLam: ${token.includes('WEJLam')}`); console.log(`❌ Contains NGsta: ${token.includes('NGsta')}`); console.log(`❌ Contains WEJKam: ${token.includes('WEJKam')}`); const url = `https://composer.euconquisto.com/#/embed/auth-with-token/pt_br/home/36c92686-c494-ec11-a22a-dc984041c95d/${token}`; console.log(`\n🔗 Using URL with corrected token:`); console.log(url); let browser, page; try { console.log('\n1️⃣ Launching browser...'); browser = await chromium.launch({ headless: false, args: [ '--no-sandbox', '--disable-dev-shm-usage' ] }); const context = await browser.newContext({ viewport: { width: 1280, height: 720 } }); page = await context.newPage(); console.log('2️⃣ Navigating to Composer with CORRECTED token...'); await page.goto(url, { waitUntil: 'networkidle', timeout: 30000 }); console.log(' ✅ Navigation complete'); // Wait for content to load await page.waitForTimeout(8000); // Check for content const analysis = await page.evaluate(() => { const body = document.body; const buttons = document.querySelectorAll('button'); return { title: document.title, url: window.location.href, bodyText: body.textContent?.slice(0, 500) || '', buttonCount: buttons.length, buttonTexts: Array.from(buttons).slice(0, 5).map(btn => btn.textContent?.trim()).filter(text => text), hasNovaButton: body.textContent?.includes('NOVA COMPOSIÇÃO') || false }; }); console.log('3️⃣ Page Analysis:'); console.log(` - Title: ${analysis.title}`); console.log(` - Buttons: ${analysis.buttonCount}`); console.log(` - Button texts: [${analysis.buttonTexts.join(', ')}]`); console.log(` - Has NOVA COMPOSIÇÃO: ${analysis.hasNovaButton ? '✅ YES' : '❌ NO'}`); console.log(` - Body preview: ${analysis.bodyText.slice(0, 100)}...`); // Screenshot const timestamp = Date.now(); await page.screenshot({ path: `corrected-navigation-${timestamp}.png`, fullPage: true }); console.log(`📸 Screenshot: corrected-navigation-${timestamp}.png`); console.log('\n🔍 Keeping browser open for 20 seconds for manual verification...'); console.log(' Please manually verify if this looks correct!'); await page.waitForTimeout(20000); } catch (error) { console.error('❌ Test failed:', error.message); } finally { if (browser) { await browser.close(); console.log('🔒 Browser closed'); } } } testCorrectedNavigation().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