import { render, screen } from '@testing-library/react';
import { describe, it, expect } from 'vitest';
import { Badge } from './Badge';
import { DocumentStatus } from '../types';

describe('Badge', () => {
  it('renders Exported badge with check icon', () => {
    render(<Badge status="Exported" />);
    expect(screen.getByText('Exported')).toBeInTheDocument();
  });

  it('renders Pending status', () => {
    render(<Badge status={DocumentStatus.PENDING} />);
    expect(screen.getByText('Pending')).toBeInTheDocument();
  });

  it('renders Verified status', () => {
    render(<Badge status={DocumentStatus.VERIFIED} />);
    expect(screen.getByText('Verified')).toBeInTheDocument();
  });

  it('renders Labeled status', () => {
    render(<Badge status={DocumentStatus.LABELED} />);
    expect(screen.getByText('Labeled')).toBeInTheDocument();
  });

  it('renders Partial status with warning indicator', () => {
    render(<Badge status={DocumentStatus.PARTIAL} />);
    expect(screen.getByText('Partial')).toBeInTheDocument();
    expect(screen.getByText('!')).toBeInTheDocument();
  });
});
