import { describe, it, expect } from 'vitest'
import { render } from '@testing-library/react'
import { StatusDot } from './StatusDot'

describe('StatusDot', () => {
  it('renders a dot element', () => {
    const { container } = render(<StatusDot variant="success" />)
    expect(container.firstChild).toBeInTheDocument()
  })

  it('applies variant class', () => {
    const { container } = render(<StatusDot variant="error" />)
    expect(container.firstChild).toHaveClass('error')
  })

  it('applies pulse class for live variant by default', () => {
    const { container } = render(<StatusDot variant="live" />)
    expect(container.firstChild).toHaveClass('pulse')
  })

  it('disables pulse when pulse=false', () => {
    const { container } = render(<StatusDot variant="live" pulse={false} />)
    expect(container.firstChild).not.toHaveClass('pulse')
  })
})
