import React from 'react';
import { test, expect } from '@playwright/experimental-ct-react';
import TestVariant from '@digigov/ui/utils/TestVariant'
import { Default } from '@digigov/ui/content/SummaryList/__stories__/Default';
import { RowVariations } from '@digigov/ui/content/SummaryList/__stories__/RowVariations';
import { SummaryListExample } from '@digigov/ui/content/SummaryList/__stories__/SummaryListExample';
import { WithActions } from '@digigov/ui/content/SummaryList/__stories__/WithActions';
import { WithError } from '@digigov/ui/content/SummaryList/__stories__/WithError';
import { WithKeyAndAction } from '@digigov/ui/content/SummaryList/__stories__/WithKeyAndAction';
import { WithNoLastBorder } from '@digigov/ui/content/SummaryList/__stories__/WithNoLastBorder';
import { WithoutActions } from '@digigov/ui/content/SummaryList/__stories__/WithoutActions';
import { WithoutBorders } from '@digigov/ui/content/SummaryList/__stories__/WithoutBorders';

test('renders the All SummaryList variants', async ({ mount, page }) => {
  await mount(
    
  <div>
    <TestVariant title="Default">
      <Default />
    </TestVariant>
    <TestVariant title="RowVariations">
      <RowVariations />
    </TestVariant>
    <TestVariant title="SummaryListExample">
      <SummaryListExample />
    </TestVariant>
    <TestVariant title="WithActions">
      <WithActions />
    </TestVariant>
    <TestVariant title="WithError">
      <WithError />
    </TestVariant>
    <TestVariant title="WithKeyAndAction">
      <WithKeyAndAction />
    </TestVariant>
    <TestVariant title="WithNoLastBorder">
      <WithNoLastBorder />
    </TestVariant>
    <TestVariant title="WithoutActions">
      <WithoutActions />
    </TestVariant>
    <TestVariant title="WithoutBorders">
      <WithoutBorders />
    </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();
});
  
