import React from 'react';
import { test, expect } from '@playwright/experimental-ct-react';
import TestVariant from '@digigov/ui/utils/TestVariant'
import { Auto } from '@digigov/ui/content/Accordion/__stories__/Auto';
import { Default } from '@digigov/ui/content/Accordion/__stories__/Default';
import { SummaryColorSecondary } from '@digigov/ui/content/Accordion/__stories__/SummaryColorSecondary';
import { UsingArrowIcons } from '@digigov/ui/content/Accordion/__stories__/UsingArrowIcons';
import { WithHints } from '@digigov/ui/content/Accordion/__stories__/WithHints';
import { WithHook } from '@digigov/ui/content/Accordion/__stories__/WithHook';

test('renders the All Accordion variants', async ({ mount, page }) => {
  await mount(
    
  <div>
    <TestVariant title="Auto">
      <Auto />
    </TestVariant>
    <TestVariant title="Default">
      <Default />
    </TestVariant>
    <TestVariant title="SummaryColorSecondary">
      <SummaryColorSecondary />
    </TestVariant>
    <TestVariant title="UsingArrowIcons">
      <UsingArrowIcons />
    </TestVariant>
    <TestVariant title="WithHints">
      <WithHints />
    </TestVariant>
    <TestVariant title="WithHook">
      <WithHook />
    </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();
});
  
