diff --git a/src/features/online-board/components/OnlineBoardDetailsPage.test.tsx b/src/features/online-board/components/OnlineBoardDetailsPage.test.tsx index d306ebf5..5faba627 100644 --- a/src/features/online-board/components/OnlineBoardDetailsPage.test.tsx +++ b/src/features/online-board/components/OnlineBoardDetailsPage.test.tsx @@ -264,4 +264,33 @@ describe("OnlineBoardDetailsPage", () => { expect(screen.getByTestId("board-details-header")).toBeTruthy(); }); }); + + describe("back button integration", () => { + it("renders DetailsBackButton in headerLeft", () => { + mockState = { flight: mockFlight, allFlights: [mockFlight], daysOfFlight: ["20260416"], loading: false, error: null }; + render(); + expect(screen.getByTestId("details-back-button")).toBeTruthy(); + }); + }); + + describe("flight schedule integration", () => { + it("renders FlightSchedule when firstLeg.daysOfWeek is present", () => { + const flightWithDaysOfWeek = { + ...mockFlight, + leg: { + ...mockFlight.leg, + daysOfWeek: { current: "1000010", flight: "1111111" }, + }, + }; + mockState = { flight: flightWithDaysOfWeek, allFlights: [flightWithDaysOfWeek], daysOfFlight: ["20260416"], loading: false, error: null }; + render(); + expect(screen.getByTestId("flight-schedule")).toBeTruthy(); + }); + + it("does not render FlightSchedule when daysOfWeek is absent", () => { + mockState = { flight: mockFlight, allFlights: [mockFlight], daysOfFlight: ["20260416"], loading: false, error: null }; + render(); + expect(screen.queryByTestId("flight-schedule")).toBeNull(); + }); + }); }); diff --git a/src/features/online-board/components/OnlineBoardDetailsPage.tsx b/src/features/online-board/components/OnlineBoardDetailsPage.tsx index e7958e5f..306e2210 100644 --- a/src/features/online-board/components/OnlineBoardDetailsPage.tsx +++ b/src/features/online-board/components/OnlineBoardDetailsPage.tsx @@ -16,7 +16,6 @@ import { FlightListSkeleton } from "@/ui/flights/FlightListSkeleton.js"; import { SeoHead } from "@/ui/seo/SeoHead.js"; import { JsonLdRenderer } from "@/shared/seo/json-ld.js"; import { PageLayout } from "@/ui/layout/PageLayout.js"; -import { PageTabs } from "@/ui/layout/PageTabs.js"; import { useAppSettings } from "@/shared/hooks/useAppSettings.js"; import { useFlightDetails } from "../hooks/useFlightDetails.js"; import { useLiveFlightDetails } from "../hooks/useLiveFlightDetails.js"; @@ -27,6 +26,8 @@ import { FlightDetailsAccordion } from "./details-panels/FlightDetailsAccordion. import { FlightsMiniList } from "./FlightsMiniList/index.js"; import { DayTabs } from "./DayTabs/index.js"; import { BoardDetailsHeader } from "./BoardDetailsHeader/index.js"; +import { DetailsBackButton } from "./DetailsBackButton/index.js"; +import { FlightSchedule } from "./FlightSchedule/index.js"; import type { IParsedFlightId, IFlightLeg } from "../types.js"; export interface OnlineBoardDetailsPageProps { @@ -192,7 +193,7 @@ export const OnlineBoardDetailsPage: FC = ({ const onlineboardHref = `/${locale}/onlineboard`; const commonLayoutProps = { - headerLeft: , + headerLeft: , breadcrumbs: [ { label: t("BREADCRUMBS.ONLINEBOARD"), url: onlineboardHref }, ], @@ -237,7 +238,7 @@ export const OnlineBoardDetailsPage: FC = ({ } + headerLeft={} title={{flightNumber}} breadcrumbs={[ { label: t("BREADCRUMBS.ONLINEBOARD"), url: onlineboardHref }, @@ -297,6 +298,8 @@ export const OnlineBoardDetailsPage: FC = ({ Total flying time: {displayFlight.flyingTime} + + >