mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-07-31 12:31:17 -07:00
Fixes #280 - adds territory focus buttons for Alaska, Hawaii, Lower 48, and Puerto Rico to enable easy zoom to these locations (#315)
This commit is contained in:
parent
2257627938
commit
5bade764c6
5 changed files with 166 additions and 16 deletions
25
client/cypress/e2e/map.spec.js
Normal file
25
client/cypress/e2e/map.spec.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
// / <reference types="Cypress" />
|
||||
|
||||
describe('Tests for the Explore the Map page', () => {
|
||||
beforeEach(() => {
|
||||
cy.viewport('macbook-13');
|
||||
cy.visit('http://localhost:8000/en/cejst');
|
||||
});
|
||||
|
||||
// The below values all assume a 13-inch MB as set in viewport above.
|
||||
// Values will be different for different screens
|
||||
const tests = {
|
||||
'Lower 48': '3.83/38.07/-95.87',
|
||||
'Alaska': '3.36/63.28/-140.24',
|
||||
'Hawaii': '5.94/20.574/-161.438',
|
||||
'Puerto Rico': '8.24/18.2/-66.583',
|
||||
};
|
||||
|
||||
for (const [territory, zxy] of Object.entries(tests)) {
|
||||
it(`Can zoom to ${territory} `, () => {
|
||||
cy.get(`[aria-label="Zoom to ${territory}"]`).click();
|
||||
cy.url().should('include', zxy);
|
||||
});
|
||||
};
|
||||
});
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue