Add standalone API proxy via curl (bypasses WAF TLS fingerprinting)
Modern.js SSR intercepts all routes before any Express middleware, so the API proxy runs as a separate Express server on port 8080. Modern.js runs on 8081. The proxy uses curl subprocesses which go through the system HTTPS proxy (GOST) with a proper TLS fingerprint that the Aeroflot WAF accepts. Usage: node scripts/dev-server.mjs (replaces pnpm dev for full-stack) Also: remove stray e2e-angular test directory, fix env default to same-origin /api.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
import { todayStr } from '../../src/lib/date-utils';
|
||||
|
||||
const today = todayStr();
|
||||
const dateParam = today.replace(/-/g, '');
|
||||
|
||||
test.describe('Flight board visual regression', () => {
|
||||
test('departures view matches screenshot', async ({ page }) => {
|
||||
await page.goto(`/ru-ru/onlineboard/departure/MOW-${dateParam}`);
|
||||
await page.waitForLoadState('networkidle');
|
||||
await expect(page).toHaveScreenshot('flight-board-departures.png', {
|
||||
fullPage: true,
|
||||
});
|
||||
});
|
||||
|
||||
test('arrivals view matches screenshot', async ({ page }) => {
|
||||
await page.goto(`/ru-ru/onlineboard/arrival/MOW-${dateParam}`);
|
||||
await page.waitForLoadState('networkidle');
|
||||
await expect(page).toHaveScreenshot('flight-board-arrivals.png', {
|
||||
fullPage: true,
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,21 @@
|
||||
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 });
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,15 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
import { todayStr } from '../../src/lib/date-utils';
|
||||
|
||||
const today = todayStr();
|
||||
const dateParam = today.replace(/-/g, '');
|
||||
|
||||
test.describe('Landing page visual regression', () => {
|
||||
test('matches landing page screenshot', async ({ page }) => {
|
||||
await page.goto(`/ru-ru/onlineboard/departure/MOW-${dateParam}`);
|
||||
await page.waitForLoadState('networkidle');
|
||||
await expect(page).toHaveScreenshot('landing.png', {
|
||||
fullPage: true,
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user