import React from 'react';
import { test, expect } from '@playwright/experimental-ct-react';
import TestVariant from '@digigov/ui/utils/TestVariant'
import { ConditionalReveal } from '@digigov/ui/form/RadioContainer/__stories__/ConditionalReveal';
import { Default } from '@digigov/ui/form/RadioContainer/__stories__/Default';
import { Dense } from '@digigov/ui/form/RadioContainer/__stories__/Dense';
import { Inline } from '@digigov/ui/form/RadioContainer/__stories__/Inline';
import { InlineWithDivider } from '@digigov/ui/form/RadioContainer/__stories__/InlineWithDivider';
import { MultipleQuestions } from '@digigov/ui/form/RadioContainer/__stories__/MultipleQuestions';
import { NoneAnswer } from '@digigov/ui/form/RadioContainer/__stories__/NoneAnswer';
import { WithErrorMessage } from '@digigov/ui/form/RadioContainer/__stories__/WithErrorMessage';
import { WithHints } from '@digigov/ui/form/RadioContainer/__stories__/WithHints';
import { WithMediumLegend } from '@digigov/ui/form/RadioContainer/__stories__/WithMediumLegend';

test('renders the All RadioContainer variants', async ({ mount, page }) => {
  await mount(
    
  <div>
    <TestVariant title="ConditionalReveal">
      <ConditionalReveal />
    </TestVariant>
    <TestVariant title="Default">
      <Default />
    </TestVariant>
    <TestVariant title="Dense">
      <Dense />
    </TestVariant>
    <TestVariant title="Inline">
      <Inline />
    </TestVariant>
    <TestVariant title="InlineWithDivider">
      <InlineWithDivider />
    </TestVariant>
    <TestVariant title="MultipleQuestions">
      <MultipleQuestions />
    </TestVariant>
    <TestVariant title="NoneAnswer">
      <NoneAnswer />
    </TestVariant>
    <TestVariant title="WithErrorMessage">
      <WithErrorMessage />
    </TestVariant>
    <TestVariant title="WithHints">
      <WithHints />
    </TestVariant>
    <TestVariant title="WithMediumLegend">
      <WithMediumLegend />
    </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();
});
  
