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/Masthead/__stories__/Default';
import { Secondary } from '@digigov/ui/app/Masthead/__stories__/Secondary';
import { WithElements } from '@digigov/ui/app/Masthead/__stories__/WithElements';
import { WithLogo } from '@digigov/ui/app/Masthead/__stories__/WithLogo';

test('renders the All Masthead variants', async ({ mount, page }) => {
  await mount(
    
  <div>
    <TestVariant title="Default">
      <Default />
    </TestVariant>
    <TestVariant title="Secondary">
      <Secondary />
    </TestVariant>
    <TestVariant title="WithElements">
      <WithElements />
    </TestVariant>
    <TestVariant title="WithLogo">
      <WithLogo />
    </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();
});
  
