import React from 'react';
import { test, expect } from '@playwright/experimental-ct-react';
import TestVariant from '@digigov/ui/utils/TestVariant'
import { Default } from '@digigov/ui/typography/Paragraph/__stories__/Default';
import { FontSizes } from '@digigov/ui/typography/Paragraph/__stories__/FontSizes';
import { FontWeight } from '@digigov/ui/typography/Paragraph/__stories__/FontWeight';
import { LeadVariant } from '@digigov/ui/typography/Paragraph/__stories__/LeadVariant';
import { SmallVariant } from '@digigov/ui/typography/Paragraph/__stories__/SmallVariant';

test('renders the All Paragraph variants', async ({ mount, page }) => {
  await mount(
    
  <div>
    <TestVariant title="Default">
      <Default />
    </TestVariant>
    <TestVariant title="FontSizes">
      <FontSizes />
    </TestVariant>
    <TestVariant title="FontWeight">
      <FontWeight />
    </TestVariant>
    <TestVariant title="LeadVariant">
      <LeadVariant />
    </TestVariant>
    <TestVariant title="SmallVariant">
      <SmallVariant />
    </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();
});
  
