diff --git a/cypress/e2e/excludedLinks/excluded-links-english.cy.js b/cypress/e2e/excludedLinks/excluded-links-english.cy.js new file mode 100644 index 000000000..c74bd7632 --- /dev/null +++ b/cypress/e2e/excludedLinks/excluded-links-english.cy.js @@ -0,0 +1,16 @@ +/// + +// this test will run out of the pipeline and will be a manaul test each sprint + +const english = require("../../fixtures/excluded-links-english.json"); + + +describe('check excluded links', () => { + english.forEach(url => { + it('validate page loads - english', () => { + cy.visit(url, {failOnStatusCode: false}) + cy.get('body').children().its('length').should('be.gt', 0) + + }) + }) +}) \ No newline at end of file diff --git a/cypress/e2e/excludedLinks/excluded-links-spanish.cy.js b/cypress/e2e/excludedLinks/excluded-links-spanish.cy.js new file mode 100644 index 000000000..ceed0f7fb --- /dev/null +++ b/cypress/e2e/excludedLinks/excluded-links-spanish.cy.js @@ -0,0 +1,16 @@ +/// + +// this test will run out of the pipeline and will be a manaul test each sprint + +const spanish = require("../../fixtures/excluded-links-spanish.json"); + + +describe('check excluded links', () => { + spanish.forEach(url => { + it('validate page loads - spanish', () => { + cy.visit(url, {failOnStatusCode: false}) + cy.get('body').children().its('length').should('be.gt', 0) + + }) + }) +}) \ No newline at end of file diff --git a/cypress/e2e/externalLinks/english-external-links-validator.cy.js b/cypress/e2e/externalLinks/english-external-links-validator.cy.js index 214813ec4..ef4e2957d 100644 --- a/cypress/e2e/externalLinks/english-external-links-validator.cy.js +++ b/cypress/e2e/externalLinks/english-external-links-validator.cy.js @@ -1,5 +1,6 @@ /// + const allPages = require("../../fixtures/site-pages.json"); const excludedlinks = [ diff --git a/cypress/e2e/externalLinks/spanish-external-links-validator.cy.js b/cypress/e2e/externalLinks/spanish-external-links-validator.cy.js index ea0009d0b..b2cf984d7 100644 --- a/cypress/e2e/externalLinks/spanish-external-links-validator.cy.js +++ b/cypress/e2e/externalLinks/spanish-external-links-validator.cy.js @@ -15,9 +15,9 @@ const excludedlinks = [ 'https://vote.sos.ri.gov/VoterSpanish/RegisterToVote?ref=voteusa_es', 'https://vote.sos.ri.gov/HomeSpanish/UpdateVoterRecord?ActiveFlag=0&?ref=voteusa_es', // sc links - 'https://vrems.scvotes.sc.gov/Voter/Login?ref=voteusa_es', - 'https://scvotes.gov/voters/register-to-vote/?ref=voteusa_es', - 'https://info.scvotes.sc.gov/eng/ovr/start.aspx?ref=voteusa_es' + 'https://vrems.scvotes.sc.gov/Voter/Login?ref=voteusa_es', + 'https://scvotes.gov/voters/register-to-vote/?ref=voteusa_es', + 'https://info.scvotes.sc.gov/eng/ovr/start.aspx?ref=voteusa_es' ]; describe("Spanish External Link Validator Test", () => { diff --git a/cypress/support/excluded-links-english.json b/cypress/fixtures/excluded-links-english.json similarity index 99% rename from cypress/support/excluded-links-english.json rename to cypress/fixtures/excluded-links-english.json index 21a95604c..dd65acfdb 100644 --- a/cypress/support/excluded-links-english.json +++ b/cypress/fixtures/excluded-links-english.json @@ -12,5 +12,6 @@ "https://vrems.scvotes.sc.gov/Voter/Login?ref=voteusa_en", "https://scvotes.gov/voters/register-to-vote/?ref=voteusa_en", "https://info.scvotes.sc.gov/eng/ovr/start.aspx?ref=voteusa_en" + -] \ No newline at end of file +] \ No newline at end of file diff --git a/cypress/support/excluded-links-spanish.json b/cypress/fixtures/excluded-links-spanish.json similarity index 100% rename from cypress/support/excluded-links-spanish.json rename to cypress/fixtures/excluded-links-spanish.json diff --git a/cypress/support/excluded-links-english.cy.js b/cypress/support/excluded-links-english.cy.js deleted file mode 100644 index 9f3c3b548..000000000 --- a/cypress/support/excluded-links-english.cy.js +++ /dev/null @@ -1,50 +0,0 @@ -/// - -// import { forEach } from "../../fixtures/excluded-links-english.json"; - -// describe('check excluded links', () => { -// forEach(url => { -// it('validate page loads - english', () => { -// cy.visit(url, {failOnStatusCode: false}) -// // eslint-disable-next-line cypress/no-unnecessary-waiting -// cy.wait(1000) -// cy.get('body').children().its('length').should('be.gt', 0) -// }) -// }) -// }) - -const english = [ - "https://voterservices.elections.maryland.gov/OnlineVoterRegistration/InstructionsStep1?ref=voteusa_en", - "https://www.sec.state.ma.us/ovr/?ref=voteusa_en", - "https://olvr.ohiosos.gov/?ref=voteusa_en", - "https://voterlookup.ohiosos.gov/voterlookup.aspx?ref=voteusa_en", - "https://olvr.hawaii.gov/?ref=voteusa_en", - "https://elections.hawaii.gov/voters/registration/?ref=voteusa_en", - "https://vote.sos.ri.gov/Home/RegistertoVote?ref=voteusa_en", - "https://vote.sos.ri.gov/Voter/RegisterToVote?ref=voteusa_en", - "https://vote.sos.ri.gov/Home/UpdateVoterRecord?ActiveFlag=0&?ref=voteusa_en", - "https://vrems.scvotes.sc.gov/Voter/Login?ref=voteusa_en", - "https://scvotes.gov/voters/register-to-vote/?ref=voteusa_en", - "https://info.scvotes.sc.gov/eng/ovr/start.aspx?ref=voteusa_en" - -] - -describe('Validate Excluded pages load', () =>{ - english.forEach((url) => { - it(`check english ${url}`, () => { - cy.visit(url, {failOnStatusCode: false}) - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(3000) - cy.get('body').children().invoke('text').should('have.length.gt', 0) - - // .should('not.be.empty') - - // .its('length').should('be.gt', 0) - - // .children() - - - }) - }) -}) - diff --git a/cypress/support/excluded-links-spanish.cy.js b/cypress/support/excluded-links-spanish.cy.js deleted file mode 100644 index edad29b3c..000000000 --- a/cypress/support/excluded-links-spanish.cy.js +++ /dev/null @@ -1,27 +0,0 @@ -/// - -const spanish = [ - "https://voterservices.elections.maryland.gov/OnlineVoterRegistration/InstructionsStep1?ref=voteusa_es", - "https://www.sec.state.ma.us/ovr/?ref=voteusa_es", - "https://olvr.ohiosos.gov/?ref=voteusa_es", - "https://voterlookup.ohiosos.gov/voterlookup.aspx?ref=voteusa_es", - "https://olvr.hawaii.gov/?ref=voteusa_es", - "https://elections.hawaii.gov/voters/registration/?ref=voteusa_es", - "https://vote.sos.ri.gov/Home/RegistertoVote?ref=voteusa_es", - "https://vote.sos.ri.gov/VoterSpanish/RegisterToVote?ref=voteusa_es", - "https://vote.sos.ri.gov/HomeSpanish/UpdateVoterRecord?ActiveFlag=0&?ref=voteusa_es", - "https://vrems.scvotes.sc.gov/Voter/Login?ref=voteusa_es", - "https://scvotes.gov/voters/register-to-vote/?ref=voteusa_es", - "https://info.scvotes.sc.gov/eng/ovr/start.aspx?ref=voteusa_es" -] - -describe('Validate Excluded pages load', () =>{ - spanish.forEach((url) => { - it(`check spanish ${url}`, () => { - cy.visit(url, {failOnStatusCode: false}) - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(1000) - cy.get('body').children().its('length').should('be.gt', 0) - }) - }) -}) \ No newline at end of file