import React from 'react';
import { test, expect } from '@playwright/experimental-ct-react';
import TestVariant from '@digigov/ui/utils/TestVariant'
import { ClickableChip } from '@digigov/ui/content/Chip/__stories__/ClickableChip';
import { ClickableDeletableChip } from '@digigov/ui/content/Chip/__stories__/ClickableDeletableChip';
import { Default } from '@digigov/ui/content/Chip/__stories__/Default';
import { DeletableChip } from '@digigov/ui/content/Chip/__stories__/DeletableChip';
import { GroupOfChips } from '@digigov/ui/content/Chip/__stories__/GroupOfChips';

test('renders the All Chip variants', async ({ mount, page }) => {
  await mount(
    
  <div>
    <TestVariant title="ClickableChip">
      <ClickableChip />
    </TestVariant>
    <TestVariant title="ClickableDeletableChip">
      <ClickableDeletableChip />
    </TestVariant>
    <TestVariant title="Default">
      <Default />
    </TestVariant>
    <TestVariant title="DeletableChip">
      <DeletableChip />
    </TestVariant>
    <TestVariant title="GroupOfChips">
      <GroupOfChips />
    </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();
});
  
