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/Header/__stories__/Default';
import { WithHeaderNavigation } from '@digigov/ui/app/Header/__stories__/WithHeaderNavigation';
import { WithNavigation } from '@digigov/ui/app/Header/__stories__/WithNavigation';
import { WithServiceName } from '@digigov/ui/app/Header/__stories__/WithServiceName';
import { WithServiceNameAndLogo } from '@digigov/ui/app/Header/__stories__/WithServiceNameAndLogo';

test('renders the All Header variants', async ({ mount, page }) => {
  await mount(
    
  <div>
    <TestVariant title="Default">
      <Default />
    </TestVariant>
    <TestVariant title="WithHeaderNavigation">
      <WithHeaderNavigation />
    </TestVariant>
    <TestVariant title="WithNavigation">
      <WithNavigation />
    </TestVariant>
    <TestVariant title="WithServiceName">
      <WithServiceName />
    </TestVariant>
    <TestVariant title="WithServiceNameAndLogo">
      <WithServiceNameAndLogo />
    </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();
});
  
