mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-08-06 13:44: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
22
client/cypress/integration/LegacyTests/allLinks.spec.js
Normal file
22
client/cypress/integration/LegacyTests/allLinks.spec.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
// / <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');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue