fix(planner): hold the tests and the road trip rule to the corrected morning stay

The road trip spec and wiki described the old choice of the stay a day wakes up in,
and three tests still looked for the Tour label.
This commit is contained in:
Maurice
2026-11-04 14:00:35 +01:00
parent 3c78452c14
commit 82295a1d3f
5 changed files with 8 additions and 7 deletions
@@ -169,7 +169,7 @@ describe('buildDayRouteRuns', () => {
expect(hotelBookendOf(run[0], run[1])).toBe('morning')
})
it('FE-MAP-DRP-017: the morning after a night away starts at the side trip's hotel, not the room kept at home', () => {
it("FE-MAP-DRP-017: the morning after a night away starts at the side trip's hotel, not the room kept at home", () => {
// The first hotel stays booked over the whole trip and comes first in the list; the
// side trip's hotel holds the night before. The day used to start with a 716 km drive
// from the kept room to the side trip's first stop.
@@ -133,7 +133,7 @@ describe('ReservationModal', () => {
expect(screen.getByRole('button', { name: /^Accommodation$/i })).toBeInTheDocument();
expect(screen.getByRole('button', { name: /^Restaurant$/i })).toBeInTheDocument();
expect(screen.getByRole('button', { name: /^Event$/i })).toBeInTheDocument();
expect(screen.getByRole('button', { name: /^Tour$/i })).toBeInTheDocument();
expect(screen.getByRole('button', { name: /^Guided tour$/i })).toBeInTheDocument();
expect(screen.getByRole('button', { name: /^Parking$/i })).toBeInTheDocument();
// The pill reads "Booking Type: Other", so only its option is named plain "Other".
expect(screen.getAllByRole('button', { name: /^Other$/i })).toHaveLength(1);
@@ -708,7 +708,7 @@ describe('ReservationModal', () => {
it('FE-PLANNER-RESMODAL-045: tour type shows time pickers', async () => {
render(<ReservationModal {...defaultProps} />);
await pickType(/^Tour$/i);
await pickType(/^Guided tour$/i);
await waitFor(() => {
expect(screen.getAllByTestId('time-picker').length).toBeGreaterThan(0);
});
@@ -121,7 +121,7 @@ describe('BookingsTimeline: trip view', () => {
expect(screen.getByText('No date')).toBeInTheDocument();
const metro = screen.getByRole('button', { name: /Metro ride/ });
expect(metro).toHaveAttribute('aria-pressed', 'true');
expect(screen.getByRole('button', { name: /Bonus tour/ })).toHaveTextContent('Tour, Pending');
expect(screen.getByRole('button', { name: /Bonus tour/ })).toHaveTextContent('Guided tour, Pending');
expect(screen.getByRole('button', { name: /Farewell dinner/ })).toHaveTextContent('Restaurant, Confirmed');
await userEvent.click(screen.getByRole('button', { name: /Farewell dinner/ }));
expect(onSelect).toHaveBeenCalledWith(early);