#49 feat: boton para volver al zoom general en el mapa de provenance con icono fit-to-page

This commit is contained in:
2026-08-16 12:36:00 -05:00
parent f24e7ab2ec
commit 798a9bba15
3 changed files with 38 additions and 2 deletions

View File

@@ -343,6 +343,16 @@ describe('ProvenanceMap', () => {
expect(document.body.textContent).toContain('sin geolocalización')
})
it('al hacer clic en el botón de zoom general vuelve a encuadrar todos los marcadores', async () => {
const { wrapper } = mountMap()
await flushPromises()
leaflet.map.fitBounds.mockClear()
await wrapper.find('[data-test="map-reset-zoom"]').trigger('click')
expect(leaflet.map.fitBounds).toHaveBeenCalledTimes(1)
})
it('lee las coordenadas string del backend y da fondo visible al producto sin imagen', async () => {
const backendProvenance = [
{