Skip to main content
Glama
v2.0.test.js1.66 kB
const { test, expect } = require('@playwright/test'); test.describe('v2.0 Static UI', () => { test('loads index.html with title and lists', async ({ page }) => { await page.goto('/'); await expect(page).toHaveTitle('TPC Server'); await expect(page.locator('h1')).toContainText('TPC Server'); await expect(page.locator('#plans-list')).toBeVisible(); await expect(page.locator('#thoughts-list')).toBeVisible(); // Wait for async load to complete await page.waitForSelector('#plans-list li[data-plan-id]'); await page.waitForSelector('#thoughts-list li[data-thought-id]'); // Since DB has migrated data, expect at least one item in each list await expect(page.locator('#plans-list li')).toHaveCount(10); await expect(page.locator('#thoughts-list li')).toHaveCount(6); }); test('serves /tpc.db binary file', async ({ request }) => { const response = await request.get('/tpc.db'); expect(response.status()).toBe(200); expect(response.headers()['content-type']).toContain('application/octet-stream'); expect(response.body()).not.toBeNull(); }); test('handles empty lists if no data', async ({ page }) => { // This test assumes we can run with clean DB, but for now, skip or note // For v2.0, since data exists, focus on presence await page.goto('/'); const plansList = page.locator('#plans-list li'); const thoughtsList = page.locator('#thoughts-list li'); // Verify no error messages if data present await expect(plansList.first()).not.toContainText('Error loading data'); await expect(thoughtsList.first()).not.toContainText('Error loading data'); }); });

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/suttonwilliamd/tpc-server'

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