import React from 'react';
import { test, expect } from '@playwright/experimental-ct-react';
import TestVariant from '@digigov/ui/utils/TestVariant'
import { Default } from '@digigov/ui/app/Footer/__stories__/Default';
import { DefaultCopyright } from '@digigov/ui/app/Footer/__stories__/DefaultCopyright';
import { FooterAllInclusive } from '@digigov/ui/app/Footer/__stories__/FooterAllInclusive';
import { FooterWithLink } from '@digigov/ui/app/Footer/__stories__/FooterWithLink';
import { FooterWithLogo } from '@digigov/ui/app/Footer/__stories__/FooterWithLogo';
import { FooterWithSecondaryNavigation } from '@digigov/ui/app/Footer/__stories__/FooterWithSecondaryNavigation';
import { FooterWithText } from '@digigov/ui/app/Footer/__stories__/FooterWithText';
import { YearCopyright } from '@digigov/ui/app/Footer/__stories__/YearCopyright';

test('renders the All Footer variants', async ({ mount, page }) => {
  await mount(
    
  <div>
    <TestVariant title="Default">
      <Default />
    </TestVariant>
    <TestVariant title="DefaultCopyright">
      <DefaultCopyright />
    </TestVariant>
    <TestVariant title="FooterAllInclusive">
      <FooterAllInclusive />
    </TestVariant>
    <TestVariant title="FooterWithLink">
      <FooterWithLink />
    </TestVariant>
    <TestVariant title="FooterWithLogo">
      <FooterWithLogo />
    </TestVariant>
    <TestVariant title="FooterWithSecondaryNavigation">
      <FooterWithSecondaryNavigation />
    </TestVariant>
    <TestVariant title="FooterWithText">
      <FooterWithText />
    </TestVariant>
    <TestVariant title="YearCopyright">
      <YearCopyright />
    </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();
});
  
