mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-27 23:27:31 +00:00
test(tours): expect the time estimate on imported tours and hikes without a time
Since the estimate rule, an import without its own time shows the worked-out estimate on the day plan tile, and the sidebar metrics lead with it. Add the estimate field to the RS-01 fixture.
This commit is contained in:
@@ -188,6 +188,7 @@ describe('DayPlanSidebar', () => {
|
||||
manuallyOverridden: false,
|
||||
walk: null,
|
||||
atLeast: false,
|
||||
estimate: null,
|
||||
};
|
||||
const props = makeDefaultProps({
|
||||
days: [day],
|
||||
@@ -322,7 +323,10 @@ describe('DayPlanSidebar', () => {
|
||||
render(<DayPlanSidebar {...props} />);
|
||||
|
||||
expect(screen.getByTestId('plan-tour-icon').querySelector('.lucide-mountain')).toBeTruthy();
|
||||
expect(screen.queryByTestId('trip-plan-tour-time')).not.toBeInTheDocument();
|
||||
// TIME-01: without a time of its own the import shows its estimate, worked out from its measures.
|
||||
const time = screen.getByTestId('trip-plan-tour-time');
|
||||
expect(time).toHaveTextContent('≈ 2 h 21 min');
|
||||
expect(time).toHaveAccessibleName(expect.stringContaining('Estimated time: 2 h 21 min'));
|
||||
});
|
||||
|
||||
it('RC-01: a tour row offers no booking, a tour is not booked', () => {
|
||||
|
||||
Reference in New Issue
Block a user