import { useEffect, useState } from 'react' import { apiFetch } from '@core/lib/api' import { Card, CardContent, CardHeader, CardTitle } from '@core/components/ui/card' export default function TestRunsPage() { const [runs, setRuns] = useState([]) const [loading, setLoading] = useState(true) const [error, setError] = useState(null) useEffect(() => { setLoading(true) apiFetch('/api/admin-data?entity=test_runs&limit=200') .then(r => r.json()) .then(json => { const data = Array.isArray(json?.data) ? json.data : [] setRuns(data) }) .catch(err => setError(err.message || 'Failed to load test runs')) .finally(() => setLoading(false)) }, []) return (

Test Runs

{loading &&

Loading test runs…

} {error &&

{error}

} {runs.length === 0 && !loading && !error && ( No test runs

Test runs will appear here once the test runner writes to the test_runs table.

)}
{runs.map((run: any) => (
{run.suite || 'Unnamed run'}
{run.status} · {run.total || 0} total · {run.passed || 0} passed · {run.failed || 0} failed · {run.skipped || 0} skipped
))}
) }