import { render, screen } from '@testing-library/react';
import { ThemeProvider } from '../../../theme';
import SurfaceCard from './SurfaceCard';

describe('<SurfaceCard/>', () => {
  const wrap = (ui: React.ReactNode) => render(<ThemeProvider>{ui}</ThemeProvider>);

  it('renders its children', () => {
    wrap(<SurfaceCard>content</SurfaceCard>);
    expect(screen.getByText('content')).toBeInTheDocument();
  });

  it('passes through data attributes and other Paper props', () => {
    wrap(<SurfaceCard data-testid="card">content</SurfaceCard>);
    expect(screen.getByTestId('card')).toBeInTheDocument();
  });
});
