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

jest.mock('framer-motion', () => ({
  useInView: () => true,
}));

describe('KeyFiguresSection', () => {
  it('shouldRenderAllFourFigureLabels', () => {
    render(<KeyFiguresSection />);
    expect(screen.getByText('figures_events')).toBeInTheDocument();
    expect(screen.getByText('figures_groups')).toBeInTheDocument();
    expect(screen.getByText('figures_communes')).toBeInTheDocument();
    expect(screen.getByText('figures_since')).toBeInTheDocument();
  });

  it('shouldRenderFourValueItems', () => {
    const {container} = render(<KeyFiguresSection />);
    expect(container.querySelectorAll('.tk-figures__value').length).toBe(4);
  });
});
