Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

test(roadtrip): a ferry leg draws no car on its band, while the day head keeps its drive pill's car

Maurice4a36a60f5ae7
diff --git a/client/src/components/Roadtrip/RoadtripSidebar.test.tsx b/client/src/components/Roadtrip/RoadtripSidebar.test.tsx
index cfc5aa66a..d4bca995f 100644
--- a/client/src/components/Roadtrip/RoadtripSidebar.test.tsx
+++ b/client/src/components/Roadtrip/RoadtripSidebar.test.tsx
@@ -653,7 +653,10 @@ describe('RoadtripSidebar', () => {
// whose mode nobody drew an icon for.
const ride = wrap(<RoadtripSidebar routes={routes({ days: [day({ legs: [leg({ mode: 'ferry' })] })] })} />)
expect(ride.container.querySelector('svg.lucide-sailboat')).toBeInTheDocument()
- expect(ride.container.querySelector('svg.lucide-car-front')).toBeNull()
+ // The day head sums the drive under a car of its own; the band itself draws none.
+ const head = screen.getByRole('heading', { level: 3 }).parentElement
+ const cars = [...ride.container.querySelectorAll('svg.lucide-car-front')]
+ expect(cars.filter(svg => !head?.contains(svg))).toHaveLength(0)
})
it('FE-ROADTRIP-SIDEBAR-017: a late finding without a figure still reports itself', () => {