import React from 'react';
import { test, expect } from '@playwright/experimental-ct-react';
import TestVariant from '@digigov/ui/utils/TestVariant'
import { Default } from '@digigov/ui/layouts/Screen/__stories__/Default';
import { ScreenDown } from '@digigov/ui/layouts/Screen/__stories__/ScreenDown';
import { ScreenUp } from '@digigov/ui/layouts/Screen/__stories__/ScreenUp';
import { SpecificScreenSize } from '@digigov/ui/layouts/Screen/__stories__/SpecificScreenSize';

test('renders the All Screen variants', async ({ mount, page }) => {
  await mount(
    
  <div>
    <TestVariant title="Default">
      <Default />
    </TestVariant>
    <TestVariant title="ScreenDown">
      <ScreenDown />
    </TestVariant>
    <TestVariant title="ScreenUp">
      <ScreenUp />
    </TestVariant>
    <TestVariant title="SpecificScreenSize">
      <SpecificScreenSize />
    </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();
});
  
