mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 13:36:48 +00:00
test(roadtrip): a ferry leg draws no car on its band, while the day head keeps its drive pill's car
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user