import React from 'react';
import { test, expect } from '@playwright/experimental-ct-react';

import { Default } from '@digigov/ui/navigation/Pagination/__stories__/Default';

test('renders the Default Hover and click no3', async ({ mount, page }) => {
  await mount(<Default />);
  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);

  await page.locator('#root>nav:nth-child(1)>ul>li:nth-child(4)>a').hover();
  await page.locator('#root>nav:nth-child(1)>ul>li:nth-child(4)>a').click();

  const screenshot = await page.screenshot({
    fullPage: true,
    animations: 'disabled',
  });
  expect(screenshot).toMatchSnapshot();
});
