mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-09-30 13:13:17 -07:00
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:
parent
11d13e034e
commit
27d9472326
4 changed files with 54 additions and 27 deletions
15
client/cypress/e2e/latlngurl.spec.js
Normal file
15
client/cypress/e2e/latlngurl.spec.js
Normal 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');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue