mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-09-30 05:33:18 -07:00
Fix all failing cypress tests (#774)
* Fix all failing cypress tests - update test name to be more appropriate - update download packet tests to CDN - update data-cy tag on About heading * Update snapshot
This commit is contained in:
parent
e47cffc3f9
commit
819113ceb7
11 changed files with 52 additions and 41 deletions
|
@ -0,0 +1,32 @@
|
|||
// / <reference types="Cypress" />
|
||||
|
||||
describe('Will it zoom into territories correctly?', () => {
|
||||
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
|
||||
|
||||
// Removing z as each tests has variance on it's value
|
||||
const tests = {
|
||||
'Lower 48': '/38.07/-95.87',
|
||||
'Puerto Rico': '/18.2/-66.583',
|
||||
|
||||
// Todo: Understand what causes these two to hang intermittently ticket #579
|
||||
// 'Alaska': '/63.28/-162.39',
|
||||
// 'Hawaii': '5.35/20.574/-161.438',
|
||||
};
|
||||
|
||||
for (const [territory, xy] 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.log(cy.url());
|
||||
cy.url().should('include', xy);
|
||||
});
|
||||
});
|
||||
};
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue