/** * llmindex.io — e2e smoke tests (home, methodology, API health) * Author: Simon-Pierre Boucher * Contact: contact@spboucher.ai * License: Proprietary — © Simon-Pierre Boucher, all rights reserved */ import { expect, test } from '@playwright/test'; test('home renders leaderboard shell', async ({ page }) => { await page.goto('/'); await expect(page.getByRole('heading', { name: /discriminative LLM index/i })).toBeVisible(); }); test('methodology shows weights and IRT hyperparams', async ({ page }) => { await page.goto('/methodology'); await expect(page.getByText('Sub-metric weights', { exact: false })).toBeVisible(); await expect(page.getByText('accuracy_irt')).toBeVisible(); }); test('API health responds with maintainer credit', async ({ request }) => { const res = await request.get('/api/v1/health'); const body = await res.json(); expect(body.maintainer).toContain('Simon-Pierre Boucher'); }); test('API methodology exposes weights, never answer keys', async ({ request }) => { const res = await request.get('/api/v1/methodology'); expect(res.ok()).toBeTruthy(); const body = await res.json(); expect(body.submetric_weights).toBeDefined(); expect(JSON.stringify(body)).not.toContain('answerKey'); });