import React from 'react';
import { test, expect } from '@playwright/experimental-ct-react';
import TestVariant from '@digigov/ui/utils/TestVariant'
import { Auto } from '@digigov/ui/navigation/Pagination/__stories__/Auto';
import { Default } from '@digigov/ui/navigation/Pagination/__stories__/Default';
import { PaginationSmall } from '@digigov/ui/navigation/Pagination/__stories__/PaginationSmall';
import { PaginationWithSmallFont } from '@digigov/ui/navigation/Pagination/__stories__/PaginationWithSmallFont';
import { WithHook } from '@digigov/ui/navigation/Pagination/__stories__/WithHook';
import { WithInactiveValues } from '@digigov/ui/navigation/Pagination/__stories__/WithInactiveValues';
import { WithResultsPerPage } from '@digigov/ui/navigation/Pagination/__stories__/WithResultsPerPage';

test('renders the All Pagination variants', async ({ mount, page }) => {
  await mount(
    
  <div>
    <TestVariant title="Auto">
      <Auto />
    </TestVariant>
    <TestVariant title="Default">
      <Default />
    </TestVariant>
    <TestVariant title="PaginationSmall">
      <PaginationSmall />
    </TestVariant>
    <TestVariant title="PaginationWithSmallFont">
      <PaginationWithSmallFont />
    </TestVariant>
    <TestVariant title="WithHook">
      <WithHook />
    </TestVariant>
    <TestVariant title="WithInactiveValues">
      <WithInactiveValues />
    </TestVariant>
    <TestVariant title="WithResultsPerPage">
      <WithResultsPerPage />
    </TestVariant>
  </div>
  )
  await page.evaluate(() => document.fonts.ready);

  // Move the mouse to the top-left corner to avoid random hover issues
  await page.mouse.move(0, 0);


  const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' });
  expect(screenshot).toMatchSnapshot();
});
  
