From 971133a1ebe6e2683bb268f92e15aed0f0357dc3 Mon Sep 17 00:00:00 2001 From: Maurice Date: Tue, 20 Oct 2026 10:01:08 +0200 Subject: [PATCH] test(tours): read what taking a place in did from the hook test, not from a planner whose points stay put The card test's planner is a stub whose waypoints never take the new point, so the list's outcome line, which waits for the point to be in the route, cannot show there. FE-TOUR-POI-006 covers it with a planner that does. --- client/src/components/Tours/poi/tourPoiSearch.test.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/src/components/Tours/poi/tourPoiSearch.test.tsx b/client/src/components/Tours/poi/tourPoiSearch.test.tsx index 4e3b03918..682d5e13b 100644 --- a/client/src/components/Tours/poi/tourPoiSearch.test.tsx +++ b/client/src/components/Tours/poi/tourPoiSearch.test.tsx @@ -230,9 +230,8 @@ describe('TourPoiSearchCard', () => { ); fireEvent.click(within(card).getByTestId('tour-poi-add')); await waitFor(() => expect(planner.editWaypoints).toHaveBeenCalledTimes(1)); - // The card closes once the place is in, and the list says what it did. + // The card closes once the place is in. What it did is said in the list once the route has it (FE-TOUR-POI-006). expect(screen.queryByTestId('tour-poi-overlay')).not.toBeInTheDocument(); - expect(screen.getByTestId('tour-poi-outcome')).toHaveTextContent('Spring'); }); it('FE-TOUR-POI-016: the card over the map closes on its button and on Escape, and a pin on the map opens it too', async () => {