j40-cejst-2/client/cypress/integration/LegacyTests/allLinks.spec.js
Vim 819113ceb7
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
2021-10-05 12:52:03 -07:00

22 lines
536 B
JavaScript

// / <reference types="Cypress" />
describe('Do all the English pages have all links with a defined href attribute?', () => {
const pages = [
'/',
'cejst',
'methodology',
'contact',
];
pages.forEach((page) => {
it(`test all href attr on ${page} page`, () => {
cy.visit(page);
// Checks to make sure all a tags have an href:
cy.get('a').each(($a) => {
const message = $a.text();
expect($a, message).to.have.attr('href').not.contain('undefined');
});
});
});
});