import React from 'react'; import { test, expect } from '@playwright/experimental-ct-react'; import TestVariant from '@digigov/ui/utils/TestVariant' import { Default } from '@digigov/ui/content/Markdown/__stories__/Default'; const SCREENSHOT_DELAY = 2_000; const delay = ms => new Promise(resolve => setTimeout(resolve, ms)); test('renders the All Markdown variants', async ({ mount, page }) => { await mount(
) 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 delay(SCREENSHOT_DELAY); const screenshot = await page.screenshot({ fullPage: true, animations: 'disabled' }); expect(screenshot).toMatchSnapshot(); });