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:
@@ -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()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user