From 31c6bf1788d0294749c96a51b7d569fac3417268 Mon Sep 17 00:00:00 2001 From: gnezim Date: Fri, 17 Apr 2026 02:41:31 +0300 Subject: [PATCH] Add integration coverage for multi-leg timeline and transfer-bar Verifies FullRouteTimeline + TransferBar render for MultiLeg fixtures and stay absent for Direct flights, locking in the B.5 page wiring. --- .../online-board/flight-details.test.tsx | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/tests/integration/online-board/flight-details.test.tsx b/tests/integration/online-board/flight-details.test.tsx index fcd7f904..ef47b223 100644 --- a/tests/integration/online-board/flight-details.test.tsx +++ b/tests/integration/online-board/flight-details.test.tsx @@ -162,6 +162,40 @@ describe("Flight details page integration", () => { expect(screen.getByTestId("flight-leg-1")).toBeTruthy(); }); + it("renders FullRouteTimeline and a TransferBar between legs for multi-leg", () => { + setupWithFlight(MULTI_LEG_FLIGHT); + render( + , + ); + expect(screen.getByTestId("full-route-timeline")).toBeTruthy(); + expect(screen.getAllByTestId("transfer-bar")).toHaveLength(1); + // transfer-bar should include the intermediate-landing label and a computed transfer-time + const bar = screen.getByTestId("transfer-bar"); + expect(bar.textContent).toContain("SHARED.INTERMEDIATE-LANDING"); + expect(bar.querySelector('[data-testid="transfer-time"]')).toBeTruthy(); + }); + + it("does not render FullRouteTimeline or TransferBar for direct flight", () => { + setupWithFlight(DIRECT_FLIGHT); + render( + , + ); + expect(screen.queryByTestId("full-route-timeline")).toBeNull(); + expect(screen.queryByTestId("transfer-bar")).toBeNull(); + }); + it("renders operating carrier info", () => { setupWithFlight(); render(