j40-cejst-2/client/cypress/integration/LegacyTests/map.spec.js
Vim 47df35b77e
Gherkin cypress spike (#673)
* integrate gherkin/cucumber w/ cypress

- change cypress.json config from e2e back to standard integration
- add cypress-cucumber-preprocessor
- add integration test of about page

* add a title to each page

* add intl to the 404 page

* Refactor explore tool page

- add intl to static strings
- replace component css with <Grid> layout

* Add title to contact page

* add intl to title of page

* Add gherkin tests for nav to about page

- navigate from any page to the about page
- ensure each link has the title correct on that page
2021-09-15 12:06:13 -07:00

29 lines
883 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.19/38.07/-95.87',
'Puerto Rico': '7.65/18.2/-66.583',
// Todo: Understand what causes these two to hang intermittently ticket #579
// 'Alaska': '3/63.28/-162.39',
// 'Hawaii': '5.35/20.574/-161.438',
};
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);
});
});
};
});