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.
This commit is contained in:
Maurice
2026-10-20 10:01:08 +02:00
parent 0344db6d0c
commit 971133a1eb
@@ -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 () => {