'use client'
import type { FullTestResults } from './types'
interface TestSummaryProps {
results: FullTestResults
}
export function TestSummary({ results }: TestSummaryProps) {
const passRate = results.total_tests > 0
? ((results.total_passed / results.total_tests) * 100).toFixed(1)
: '0'
return (
Test-Ergebnisse
{/* Summary Stats */}
{results.total_tests}
Gesamt
{results.total_passed}
Bestanden
{results.total_failed}
Fehlgeschlagen
= 80 ? 'bg-green-50' : parseFloat(passRate) >= 50 ? 'bg-yellow-50' : 'bg-red-50'
}`}>
= 80 ? 'text-green-600' : parseFloat(passRate) >= 50 ? 'text-yellow-600' : 'text-red-600'
}`}>{passRate}%
Erfolgsrate
{/* Category Results */}
{results.categories.map((category) => (
{category.display_name}
{category.passed}/{category.total} bestanden
{category.description}
))}
{/* Duration */}
Gesamtdauer: {(results.duration_ms / 1000).toFixed(2)}s
)
}