Clean unused helpers after details-page simplification

- ScheduleDetailsPage: drop shiftYmd helper and selectedYmd local —
  both were left over from the removed day-sibling search path.
- ScheduleFlightBody.test: drop fireEvent import + FUTURE_340D /
  FUTURE_1H / YESTERDAY / todayUtc constants; they belonged to the
  Buy/Status button tests that moved to the summary-header layer.
- flight-details + error-handling integration tests: mock
  useCityName / useStationDisplayName so OnlineBoardDetailsPage can
  render without an ApiClientProvider wrapping — the station lookup
  hooks now transitively depend on useApiClient via the cached
  useDictionaries fetcher introduced in 7deb46a.
This commit is contained in:
2026-04-23 18:07:31 +03:00
parent 7deb46aeae
commit 5d18544a46
4 changed files with 18 additions and 36 deletions
@@ -92,6 +92,13 @@ vi.mock("@/shared/hooks/useAppSettings.js", () => ({
}),
}));
// OnlineBoardDetailsPage resolves station codes via useStationDisplayName,
// which internally hits useApiClient — no ApiClientProvider in this tree.
vi.mock("@/shared/hooks/useDictionaries.js", () => ({
useCityName: (code: string) => code,
useStationDisplayName: (code: string) => code,
}));
// ---------------------------------------------------------------------------
// Constants
// ---------------------------------------------------------------------------
@@ -71,6 +71,14 @@ vi.mock("@/shared/hooks/useAppSettings.js", () => ({
}),
}));
// OnlineBoardDetailsPage resolves station codes via useStationDisplayName,
// which internally hits useApiClient. There's no ApiClientProvider in
// this test tree, so stub the name-lookup hooks to echo the code.
vi.mock("@/shared/hooks/useDictionaries.js", () => ({
useCityName: (code: string) => code,
useStationDisplayName: (code: string) => code,
}));
// ---------------------------------------------------------------------------
// Helpers
// ---------------------------------------------------------------------------