feat: HSE dashboard with incident stats by type and site

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AWxyMibCuGGtSQSqfajDQ7
This commit is contained in:
2026-07-11 07:40:22 +08:00
co-authored by Claude Sonnet 4.6
parent 713556631b
commit b281420810
4 changed files with 167 additions and 0 deletions
@@ -0,0 +1,16 @@
import { describe, it, expect } from 'vitest'
import { render, screen } from '@testing-library/react'
import { StatCard } from '@/components/dashboard/stat-card'
describe('StatCard', () => {
it('renders label and value', () => {
render(<StatCard label="Total Incidents" value={42} />)
expect(screen.getByText('Total Incidents')).toBeTruthy()
expect(screen.getByText('42')).toBeTruthy()
})
it('renders optional sub text', () => {
render(<StatCard label="Open" value={12} sub="awaiting action" />)
expect(screen.getByText('awaiting action')).toBeTruthy()
})
})