Add Zoom/Lat/Lng to the URL (#293)

* mandatory eslint fix
* Addresses #286 - Adding lat/lng to the URL
* setting zoom on map load
* adding integration tests for zoom
This commit is contained in:
Nat Hillard 2021-07-06 14:52:35 -04:00 committed by GitHub
commit 27d9472326
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 54 additions and 27 deletions

View file

@ -0,0 +1,15 @@
// / <reference types="Cypress" />
describe('LatLng Test', () => {
it('Checks that as the map zooms the lat/lng coordinates in the URL update', () => {
cy.visit('http://localhost:8000/en/cejst?flags=mb');
cy.url().should('include', '#3');
cy.get('.mapboxgl-ctrl-zoom-in > .mapboxgl-ctrl-icon').click();
cy.url().should('include', '#4');
cy.getMap().then((map) => {
cy.panTo(map, [-77.9, 35.04]);
cy.url().should('include', '#4/35.04/-77.9');
});
});
});