import { render, screen, fireEvent } from '@testing-library/react';
import VotingBoard from './VotingBoard';

test('renders voting board and allows selecting a vote', () => {
  render(<VotingBoard />);
  const voteButton = screen.getByText(/5/i);
  expect(voteButton).toBeInTheDocument();

  fireEvent.click(voteButton);
  expect(voteButton).toHaveClass('selected');
});
