Files
flights_web/tests/e2e-angular/visual/flight-expanded.spec.ts
T
gnezim 375bcfb0fa Add e2e test suite from flights-front with Angular API mocks
Copies Playwright e2e tests (58 specs, 300+ tests) designed for cross-app
testing. Adapts API mocks to match real Aeroflot dictionary format (title
objects with multilingual keys), adds board/schedule/days endpoint mocks,
and provides Angular-specific Playwright config on port 4203.
2026-04-15 23:07:44 +03:00

22 lines
813 B
TypeScript

import { test, expect } from '@playwright/test';
import { todayStr } from '../../src/lib/date-utils';
const today = todayStr();
const dateParam = today.replace(/-/g, '');
test.describe('Expanded flight card visual regression', () => {
test('expanded card matches screenshot', async ({ page }) => {
await page.goto(`/ru-ru/onlineboard/departure/MOW-${dateParam}`);
await page.waitForLoadState('networkidle');
await page.waitForSelector('[class*="card"]', { timeout: 10000 });
const firstCard = page.locator('[class*="card"]').first();
await firstCard.click();
const expandedSection = page.locator('[class*="expanded"]').first();
await expect(expandedSection).toBeVisible();
await expect(expandedSection).toHaveScreenshot('flight-expanded.png', { timeout: 10000 });
});
});