Make all page endpoints constants

- fix all cypress tests
- refactor all test to use LegacyTests/constants/PAGES_ENDPOINTS
- gatsby-config to use PAGES_ENDPOINTS
- remove ScoreStepList component
- update J40Header to use constants.PAGES_ENDPOINTS
- update snapshots
- there are 3 locations to update PAGES_ENDPOINTS, namely

1. LegacyTests/constants.tsx
2. constants.tsx
3. gatsby-config
This commit is contained in:
Vim USDS 2022-04-04 20:47:17 -07:00
commit abf49a9cbc
27 changed files with 93 additions and 163 deletions

View file

@ -4,7 +4,7 @@
A risk with this test is that if the feature/area that is currently being selected become non-prioritized, then this
test will fail. However it would be a major win for that area!
*/
import {ENDPOINTS} from './constants';
import {PAGES_ENDPOINTS} from './constants';
const devices = [
[1024, 720],
@ -15,7 +15,7 @@ const devices = [
describe('tests that the map side panel renders MapIntroduction component', () => {
devices.forEach((device) => {
it(`should render MapIntroduction component on ${device[0]} x ${device[1]}`, () => {
cy.visit(ENDPOINTS.EXPLORE_THE_TOOL);
cy.visit(PAGES_ENDPOINTS.EXPLORE);
cy.viewport(device[0], device[1]);
cy.get('aside').should('be.visible');
});