diff --git a/client/src/components/Assistant/cards/journey/JourneyEntriesBlock.tsx b/client/src/components/Assistant/cards/journey/JourneyEntriesBlock.tsx index 6000490d8..05dd7935a 100644 --- a/client/src/components/Assistant/cards/journey/JourneyEntriesBlock.tsx +++ b/client/src/components/Assistant/cards/journey/JourneyEntriesBlock.tsx @@ -34,7 +34,6 @@ const TITLE_BUTTON = 'block w-full rounded-md text-start outline-none hover:underline focus-visible:ring-2 focus-visible:ring-accent'; /** The phone's taller target, the title still at the top of the row. */ const TITLE_BUTTON_TALL = `${TITLE_BUTTON} min-h-10`; -const FOOTER = 'mt-1 flex items-center gap-2 border-t border-edge-faint pt-2 text-caption'; const OPEN = 'inline-flex flex-none items-center gap-1 font-medium text-accent hover:underline'; const OPEN_TALL = 'inline-flex h-10 flex-none items-center gap-1 font-medium text-accent hover:underline'; /** The size and corners of the journal's own tile, so the count stands in the row like one more entry. */ @@ -47,7 +46,7 @@ const TILE = 'flex-none snap-start'; type Open = ((entryId: number | null) => void) | null; /** The journal's name and the way into it, under the card. */ -function JournalFooter({ journal, open }: { journal: JournalEntries; open: Open }) { +function JournalFooter({ open }: { open: Open }) { const { t } = useTranslation(); const { variant } = useAssistantView(); if (!open) return null; @@ -120,7 +119,7 @@ function JournalRows({ journal, fallbackRef }: { journal: JournalEntries; fallba {journal.entries.map((look, index) => ( 0} open={open} hover={hover} /> ))} - + ); } @@ -153,7 +152,7 @@ function JournalStrip({ journal, fallbackRef }: { journal: JournalEntries; fallb )} - + ); } diff --git a/client/src/components/Assistant/cards/tour/TourRouteCard.test.tsx b/client/src/components/Assistant/cards/tour/TourRouteCard.test.tsx index 4c326ac59..cc84ee7c6 100644 --- a/client/src/components/Assistant/cards/tour/TourRouteCard.test.tsx +++ b/client/src/components/Assistant/cards/tour/TourRouteCard.test.tsx @@ -174,7 +174,7 @@ describe('TourRouteCard', () => { // One row per stop; the walks between them are hidden, read with the stop they lead to. expect(list.querySelectorAll('li:not([aria-hidden="true"])')).toHaveLength(5); // The place beside the way has no time: the hut measures from the start, then each stop from the last. - expect(screen.getAllByText(/from the last stop$/)).toHaveLength(3); + expect(screen.getAllByRole('button', { name: /from the last stop$/ })).toHaveLength(3); const legs = [...list.querySelectorAll('li[aria-hidden="true"]')].map((leg) => leg.textContent).filter(Boolean); expect(legs).toHaveLength(3); });