ad8367c203
Search page: - Title and breadcrumb now read the station dictionaries and render the human-friendly route heading (e.g. 'Маршрут: Шереметьево - Пулково') for route/departure/arrival/flight search URLs, mirroring Angular. Details page: - Main H1 becomes 'Информация о рейсе: SU 6805, Москва - Санкт-Петербург' (carrier + flight number + origin/destination cities), not a bare flight number. - Add 'Детали рейса' section header above the accordion to match Angular's flight-details-wrapper layout. - Promote the airline block in BoardDetailsHeader: drop the legacy OperatorLogo copy with broken asset paths and hand off to the shared <OperatorLogo> under src/ui/flights. Render it with the 'авиакомпания' caption beside the enlarged flight number. - Replace hardcoded English 'Leg' / 'Total flying time' / 'Aircraft:' with i18n keys, added to all nine locale files. Test harness: - Add vi.mock for useDictionaries in the three suites that render OnlineBoardSearchPage (the new heading helper calls the hook and crashed without ApiClientProvider). 1256 tests passing.
78 lines
3.2 KiB
TypeScript
78 lines
3.2 KiB
TypeScript
/**
|
|
* Typed loaders for real API response fixtures.
|
|
*
|
|
* Captured from https://flights.test.aeroflot.ru on 2026-04-17
|
|
* via scripts/fetch-api-fixtures.sh. Re-run that script to refresh.
|
|
*
|
|
* Use these in tests to validate code against real API shapes instead
|
|
* of hand-rolled minimal mocks.
|
|
*/
|
|
|
|
import type { IBoardResponse, IDaysResponse } from "@/features/online-board/types";
|
|
import type {
|
|
IScheduleResponse,
|
|
IScheduleDetailsResponse,
|
|
IScheduleDaysResponse,
|
|
} from "@/features/schedule/types";
|
|
import type {
|
|
IDestinationsResponse,
|
|
IFlightsMapDaysResponse,
|
|
} from "@/features/flights-map/types";
|
|
import type { PopularRequest } from "@/features/popular-requests/types";
|
|
import type {
|
|
IRawRegion,
|
|
IRawCountry,
|
|
IRawCity,
|
|
IRawAirport,
|
|
} from "@/shared/dictionaries/types";
|
|
|
|
import appSettings from "./app-settings.json";
|
|
import boardByFlight from "./board-by-flight.json";
|
|
import boardByRoute from "./board-by-route.json";
|
|
import boardDaysFlight from "./board-days-flight.json";
|
|
import boardDaysRoute from "./board-days-route.json";
|
|
import destinationsFrom from "./destinations-from.json";
|
|
import destinationsRoute from "./destinations-route.json";
|
|
import dictionaryAirports from "./dictionary-airports.json";
|
|
import dictionaryCities from "./dictionary-cities.json";
|
|
import dictionaryCountries from "./dictionary-countries.json";
|
|
import dictionaryRegions from "./dictionary-regions.json";
|
|
import mapDaysRoute from "./map-days-route.json";
|
|
import onlineboardDetails from "./onlineboard-details.json";
|
|
import popularRequests from "./popular-requests.json";
|
|
import scheduleDaysRoute from "./schedule-days-route.json";
|
|
import scheduleDetails from "./schedule-details.json";
|
|
import scheduleSearch from "./schedule-search.json";
|
|
|
|
export interface AppSettings {
|
|
showDebugVersion: string;
|
|
uiOptions: {
|
|
isTestVersion: string;
|
|
filter: Record<string, { searchFrom: string; searchTo: string; timeStep: string }>;
|
|
buttons: {
|
|
buyTicket?: { period?: { min?: string; max?: string } };
|
|
flightStatus?: { availableFrom?: string; visible?: string };
|
|
};
|
|
};
|
|
}
|
|
|
|
export const fixtures = {
|
|
appSettings: appSettings as AppSettings,
|
|
boardByFlight: boardByFlight as unknown as IBoardResponse,
|
|
boardByRoute: boardByRoute as unknown as IBoardResponse,
|
|
boardDaysFlight: boardDaysFlight as unknown as IDaysResponse,
|
|
boardDaysRoute: boardDaysRoute as unknown as IDaysResponse,
|
|
destinationsFrom: destinationsFrom as unknown as IDestinationsResponse,
|
|
destinationsRoute: destinationsRoute as unknown as IDestinationsResponse,
|
|
dictionaryAirports: dictionaryAirports as unknown as IRawAirport[],
|
|
dictionaryCities: dictionaryCities as unknown as IRawCity[],
|
|
dictionaryCountries: dictionaryCountries as unknown as IRawCountry[],
|
|
dictionaryRegions: dictionaryRegions as unknown as IRawRegion[],
|
|
mapDaysRoute: mapDaysRoute as unknown as IFlightsMapDaysResponse,
|
|
onlineboardDetails: onlineboardDetails as unknown as IBoardResponse,
|
|
popularRequests: popularRequests as unknown as PopularRequest[],
|
|
scheduleDaysRoute: scheduleDaysRoute as unknown as IScheduleDaysResponse,
|
|
scheduleDetails: scheduleDetails as unknown as IScheduleDetailsResponse,
|
|
scheduleSearch: scheduleSearch as unknown as IScheduleResponse,
|
|
} as const;
|