mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-02-23 10:04:18 -08:00
* adding readme with debug instructions * updating translation tests to pass * fixes failing latlng url test * localizing focus buttons * updating map tests to pass * temporarily setting to only flag critical+ accessibility errors. To be addressed with full accessibility audit later
27 lines
795 B
JavaScript
27 lines
795 B
JavaScript
// / <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.25/38.07/-95.87',
|
|
'Alaska': '3/63.28/-162.39',
|
|
'Hawaii': '5.89/20.574/-161.438',
|
|
'Puerto Rico': '8.19/18.2/-66.583',
|
|
};
|
|
|
|
for (const [territory, zxy] of Object.entries(tests)) {
|
|
it(`Can focus on ${territory} `, () => {
|
|
cy.getMap().then((map) => {
|
|
cy.get(`[aria-label="Focus on ${territory}"]`).click();
|
|
cy.waitForMapIdle(map);
|
|
cy.url().should('include', zxy);
|
|
});
|
|
});
|
|
};
|
|
});
|