import React from 'react';
import { test, expect } from '@playwright/experimental-ct-react';
import TestVariant from '@digigov/ui/utils/TestVariant'
import { AlignItems } from '@digigov/ui/layouts/Stack/__stories__/AlignItems';
import { Default } from '@digigov/ui/layouts/Stack/__stories__/Default';
import { JustifyContent } from '@digigov/ui/layouts/Stack/__stories__/JustifyContent';
import { NoWrap } from '@digigov/ui/layouts/Stack/__stories__/NoWrap';
import { Row } from '@digigov/ui/layouts/Stack/__stories__/Row';
import { Spacing } from '@digigov/ui/layouts/Stack/__stories__/Spacing';

test('renders the All Stack variants', async ({ mount, page }) => {
  await mount(
    
  <div>
    <TestVariant title="AlignItems">
      <AlignItems />
    </TestVariant>
    <TestVariant title="Default">
      <Default />
    </TestVariant>
    <TestVariant title="JustifyContent">
      <JustifyContent />
    </TestVariant>
    <TestVariant title="NoWrap">
      <NoWrap />
    </TestVariant>
    <TestVariant title="Row">
      <Row />
    </TestVariant>
    <TestVariant title="Spacing">
      <Spacing />
    </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();
});
  
