diff --git a/client/src/components/Tours/planner/useTourPlanner.bike.test.tsx b/client/src/components/Tours/planner/useTourPlanner.bike.test.tsx index 40f5f3bcc..fc3c9aa1c 100644 --- a/client/src/components/Tours/planner/useTourPlanner.bike.test.tsx +++ b/client/src/components/Tours/planner/useTourPlanner.bike.test.tsx @@ -116,7 +116,7 @@ describe('useTourPlanner, bike tours (BIK-01)', () => { await settle(); act(() => result.current.setBikeProfile('road')); expect(JSON.parse(localStorage.getItem('tour-draft-52') || 'null')).toMatchObject({ - version: 10, + version: 11, tourType: 'bike', bikeProfile: 'road', }); diff --git a/client/src/components/Tours/planner/useTourPlanner.test.tsx b/client/src/components/Tours/planner/useTourPlanner.test.tsx index 5f0d95ab3..287512412 100644 --- a/client/src/components/Tours/planner/useTourPlanner.test.tsx +++ b/client/src/components/Tours/planner/useTourPlanner.test.tsx @@ -1618,7 +1618,7 @@ describe('useTourPlanner', () => { expect(result.current.mode).toEqual({ type: 'new-draft' }) expect(JSON.parse(localStorage.getItem('tour-draft-23') || 'null')).toMatchObject({ - version: 10, + version: 11, tourType: 'hike', name: '', waypoints: [], diff --git a/client/src/components/Tours/tourMapLayers.test.ts b/client/src/components/Tours/tourMapLayers.test.ts index f0ea6d6ae..266a74a52 100644 --- a/client/src/components/Tours/tourMapLayers.test.ts +++ b/client/src/components/Tours/tourMapLayers.test.ts @@ -5,7 +5,7 @@ describe('tourMapLayersFor (MAP-01)', () => { it('offers OpenHikingMap to a hike only while the admin allows it', () => { expect(tourMapLayersFor('hike').bases).not.toContain('hiking'); expect(tourMapLayersFor('hike', { hikingMap: true }).bases).toEqual(['default', 'topo', 'hiking', 'satellite']); - expect(tourMapLayersFor('hike', { hikingMap: true }).overlays).toEqual(['ferratas', 'pistes']); + expect(tourMapLayersFor('hike', { hikingMap: true }).overlays).toEqual(['ferratas']); expect(tourMapLayersFor('kayak', { hikingMap: true }).bases).not.toContain('hiking'); expect(tourMapLayersFor(null, { hikingMap: true }).bases).not.toContain('hiking'); }); @@ -24,10 +24,9 @@ describe('tourMapLayersFor (MAP-01)', () => { expect(baseLayerFor(tourMapLayersFor('ski'), 'hiking')).toBe('default'); }); - it('SKI-01: the pistes are offered to a hike and a ski track, never to a bike tour, a run, a paddle tour or another type', () => { - expect(tourMapLayersFor('hike').overlays).toContain('pistes'); + it('SKI-02: the pistes are offered to a ski track only, never to a hike, a bike tour, a run, a paddle tour or another type', () => { expect(tourMapLayersFor('ski').overlays).toContain('pistes'); - for (const type of ['bike', 'run', 'kayak', 'walk', null] as const) + for (const type of ['hike', 'bike', 'run', 'kayak', 'walk', null] as const) expect(tourMapLayersFor(type).overlays).not.toContain('pistes'); }); diff --git a/client/src/pages/tripPlanner/TourPlannerMapStage.test.tsx b/client/src/pages/tripPlanner/TourPlannerMapStage.test.tsx index 97ef4a9d1..9865db85e 100644 --- a/client/src/pages/tripPlanner/TourPlannerMapStage.test.tsx +++ b/client/src/pages/tripPlanner/TourPlannerMapStage.test.tsx @@ -770,11 +770,11 @@ describe('TourPlannerMapStage', () => { const overlayStates = () => flat().tourLayers?.overlays?.map((overlay) => [overlay.id, overlay.status]); - it('a hike keeps the standard map, topo and satellite and the via ferrata layer, the pistes off, and no seamarks', () => { + it('a hike keeps the standard map, topo and satellite and the via ferrata layer, and no pistes or seamarks', () => { renderStage(planner('new-draft')); expect(flat().tourLayers?.bases).toEqual(['default', 'topo', 'satellite']); expect(flat().ferrataLayer).toBeDefined(); - expect(overlayStates()).toEqual([['pistes', 'off']]); + expect(overlayStates()).toEqual([]); }); it('with no tour open there is no via ferrata layer and no seamarks, but the pistes are offered (SKI-01)', () => { diff --git a/server/tests/unit/db/repositories/CollectionTours.repository.test.ts b/server/tests/unit/db/repositories/CollectionTours.repository.test.ts index d3374ef2a..af40474c7 100644 --- a/server/tests/unit/db/repositories/CollectionTours.repository.test.ts +++ b/server/tests/unit/db/repositories/CollectionTours.repository.test.ts @@ -66,7 +66,6 @@ function snapshot(collectionId: number, savedBy: number | null, overrides: Parti match_confidence: 1, max_hiking_difficulty: 3, bike_profile: null, - winter_activity: null, run_profile: null, run_pace_seconds_per_km: null, ski_discipline: null,