import React from 'react';
import { test, expect } from '@playwright/experimental-ct-react';
import TestVariant from '@digigov/ui/utils/TestVariant'
import { BulletList } from '@digigov/ui/content/List/__stories__/BulletList';
import { Default } from '@digigov/ui/content/List/__stories__/Default';
import { HorizontalList } from '@digigov/ui/content/List/__stories__/HorizontalList';
import { NestedBulletList } from '@digigov/ui/content/List/__stories__/NestedBulletList';
import { NumberedList } from '@digigov/ui/content/List/__stories__/NumberedList';
import { WithExtraSpace } from '@digigov/ui/content/List/__stories__/WithExtraSpace';

test('renders the All List variants', async ({ mount, page }) => {
  await mount(
    
  <div>
    <TestVariant title="BulletList">
      <BulletList />
    </TestVariant>
    <TestVariant title="Default">
      <Default />
    </TestVariant>
    <TestVariant title="HorizontalList">
      <HorizontalList />
    </TestVariant>
    <TestVariant title="NestedBulletList">
      <NestedBulletList />
    </TestVariant>
    <TestVariant title="NumberedList">
      <NumberedList />
    </TestVariant>
    <TestVariant title="WithExtraSpace">
      <WithExtraSpace />
    </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();
});
  
