Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
exclude instagram link test
Browse files Browse the repository at this point in the history
  • Loading branch information
nehemiah-abuga committed Sep 6, 2023
1 parent 11d6849 commit 1d3f34a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cypress/e2e/ui/links.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@ import * as SITE_PAGES_DATA from "../../fixtures/site-pages.json"

const sitePages = SITE_PAGES_DATA.sitePages

const excludedlinks = [ "https://www.instagram.com/usagov/"]


describe("Verify correct status code when user navigates links", { browser: 'chrome' }, () => {
sitePages.forEach((sitePage) => {
it(`Verify success status code response for links in ${sitePage.name} `, () => {
cy.visit({ url: sitePage.route })
cy.get("a[href]").each((link) => {
cy.request(link.prop("href"))
if (excludedlinks.indexOf(link.prop('href')) == -1) {
cy.request(link.prop("href"))
}

})
})
})
Expand Down

0 comments on commit 1d3f34a

Please sign in to comment.