From 1d3f34a9227a344718f9ebe18dd3a36506973ca4 Mon Sep 17 00:00:00 2001 From: Nehemiah Abuga <121119072+nehemiah-abuga@users.noreply.github.com> Date: Wed, 6 Sep 2023 13:03:56 -0700 Subject: [PATCH] exclude instagram link test --- cypress/e2e/ui/links.cy.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cypress/e2e/ui/links.cy.js b/cypress/e2e/ui/links.cy.js index 63edb17051..13c10510af 100644 --- a/cypress/e2e/ui/links.cy.js +++ b/cypress/e2e/ui/links.cy.js @@ -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")) + } + }) }) })