feat: create sync status indicator component

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-12 07:52:55 +00:00
parent 3e3e90f774
commit c50cf86263
2 changed files with 110 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import { render, screen } from '@testing-library/react'
import { SyncStatusIndicator } from '@/components/bible/sync-status-indicator'
describe('SyncStatusIndicator', () => {
it('should show synced state', () => {
render(<SyncStatusIndicator status="synced" />)
expect(screen.getByTestId('sync-status-synced')).toBeInTheDocument()
})
it('should show syncing state with spinner', () => {
render(<SyncStatusIndicator status="syncing" />)
expect(screen.getByTestId('sync-status-syncing')).toBeInTheDocument()
})
it('should show error state', () => {
render(<SyncStatusIndicator status="error" errorMessage="Network error" />)
expect(screen.getByTestId('sync-status-error')).toBeInTheDocument()
expect(screen.getByText('Network error')).toBeInTheDocument()
})
it('should show pending count', () => {
render(<SyncStatusIndicator status="pending" pendingCount={3} />)
expect(screen.getByText('3 pending')).toBeInTheDocument()
})
})