import { render } from '@solidjs/testing-library'
import { Button } from '@/components/ui/button'

describe('Button', () => {
  it('renders default variant classes', () => {
    const { getByRole } = render(() => <Button>Run</Button>)
    const button = getByRole('button', { name: 'Run' })

    expect(button.className).toContain('bg-primary')
  })

  it('supports disabled state', () => {
    const { getByRole } = render(() => (
      <Button disabled variant="secondary">
        Disabled
      </Button>
    ))

    const button = getByRole('button', { name: 'Disabled' }) as HTMLButtonElement
    expect(button.disabled).toBe(true)
  })
})
