fix(tours): read e-bike chargers as mapped, keep unnamed ones on the map search

This commit is contained in:
Maurice
2026-10-21 12:05:38 +02:00
parent 1a722e63fb
commit 4eaf5e6a11
36 changed files with 77 additions and 7 deletions
@@ -1074,6 +1074,18 @@ describe('searchOverpassPois localized names (#1655)', () => {
const { pois } = await osm.searchOverpassPois('sights', bbox(4), 'fr-FR');
expect(pois[0].name).toBe('Obelisco della Minerva');
});
it('keeps an unnamed e-bike charging point, as the search along a tour does (BIK-07)', async () => {
stubOverpass({ amenity: 'charging_station', bicycle: 'yes', 'socket:schuko': '2' });
const { pois } = await osm.searchOverpassPois('ebike_charging', bbox(6), 'en-US');
expect(pois.map((p: any) => [p.name, p.category])).toEqual([['', 'ebike_charging']]);
});
it('still drops an unnamed place of any other kind', async () => {
stubOverpass({ tourism: 'attraction' });
const { pois } = await osm.searchOverpassPois('sights', bbox(7), 'en-US');
expect(pois).toEqual([]);
});
});
// ── fetchWikimediaPhoto (fetch stubbed) ───────────────────────────────────────