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(planner): the booking dialog's map button reads Map

Mauriceb48e34474932
diff --git a/client/src/components/Planner/bookings/BookingDetailHost.test.tsx b/client/src/components/Planner/bookings/BookingDetailHost.test.tsx
index 9f47ad8a5..0bbcc30a4 100644
--- a/client/src/components/Planner/bookings/BookingDetailHost.test.tsx
+++ b/client/src/components/Planner/bookings/BookingDetailHost.test.tsx
@@ -160,7 +160,7 @@ describe('BookingDetailHost', () => {
await waitFor(() => expect(toasts).toContainEqual({ message: 'Failed to update', type: 'error' }));
});
- it('FE-PLANNER-BOOKINGHOST-011: On map is offered only for a booking the map can show, and closes first', async () => {
+ it('FE-PLANNER-BOOKINGHOST-011: Map is offered only for a booking the map can show, and closes first', async () => {
const onShowOnMap = vi.fn(() => { calls.push('map'); });
const routed = buildReservation({
title: 'Shinkansen', type: 'train',
@@ -171,7 +171,7 @@ describe('BookingDetailHost', () => {
});
const { unmount } = renderHost(routed, { onShowOnMap, isOnMap: () => true });
- const onMap = screen.getByRole('button', { name: 'On map' });
+ const onMap = screen.getByRole('button', { name: 'Map' });
expect(onMap).toHaveAttribute('aria-pressed', 'true');
await userEvent.click(onMap);
expect(onShowOnMap).toHaveBeenCalledWith(routed);
@@ -179,7 +179,7 @@ describe('BookingDetailHost', () => {
unmount();
renderHost(buildReservation({ title: 'Nowhere', place_id: null }), { onShowOnMap });
- expect(screen.queryByRole('button', { name: 'On map' })).toBeNull();
+ expect(screen.queryByRole('button', { name: 'Map' })).toBeNull();
});
it('FE-PLANNER-BOOKINGHOST-012: Change route is offered for a transit journey only', async () => {