Files
babymonitor/frontend/tests/e2e/time_adjuster_visual.spec.ts
T
2026-05-31 08:42:25 +02:00

21 lines
760 B
TypeScript

import { test, expect } from '@playwright/test';
const BASE_URL = 'http://localhost:5173';
test('visual inspection of TimeAdjuster', async ({ page }) => {
await page.goto(`${BASE_URL}/playground`);
await page.waitForLoadState('networkidle');
// Select 'TimeAdjuster'
const select = page.locator('select#component-select');
await select.selectOption({ label: 'TimeAdjuster' });
// Wait for component to render
const mainArea = page.getByRole('main').last();
await expect(mainArea).toBeVisible();
// Take a clean, high-resolution screenshot of the component
const componentContainer = mainArea.locator('div').first(); // The wrapper in playground
await componentContainer.screenshot({ path: 'time_adjuster_component_clean.png' });
});