21 lines
760 B
TypeScript
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' });
|
|
});
|