release: v0.20.0

This commit is contained in:
Ralksta
2026-10-02 18:14:23 +02:00
committed by GitHub
parent 81ce886b01
commit 5f831f719a
209 changed files with 13807 additions and 803 deletions

View File

@@ -48,3 +48,31 @@ describe('localizedLeafletPrefix', () => {
);
});
});
describe('LeafletMap marker names', () => {
it('names a marker by its label, not by the count it shows', async () => {
const { container } = render(
<I18nProvider locale="de">
<LeafletMap
markers={[
{
lat: 54.16,
lng: 15.39,
html: '<div class="map-marker">12</div>',
label: 'Dźwirzyno, Polen, 12 Fotos',
},
]}
/>
</I18nProvider>,
);
const icon = await waitFor(() => {
const el = container.querySelector('.leaflet-marker-icon');
if (!el) throw new Error('marker not placed yet');
return el;
});
expect(icon.getAttribute('aria-label')).toBe('Dźwirzyno, Polen, 12 Fotos');
expect(icon.getAttribute('title')).toBe('Dźwirzyno, Polen, 12 Fotos');
expect(icon.getAttribute('role')).toBe('button');
});
});