From 2b8bf51f38a329676b16431878962b4e34c0705f Mon Sep 17 00:00:00 2001 From: Cesar Varela Date: Mon, 22 Apr 2024 20:47:41 -0300 Subject: [PATCH] Prevent test from crashing (#2742) --- .../cypress/e2e/integration/apps/newsdigest.cy.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/site/gatsby-site/cypress/e2e/integration/apps/newsdigest.cy.js b/site/gatsby-site/cypress/e2e/integration/apps/newsdigest.cy.js index 086874db12..78c4ecf18a 100644 --- a/site/gatsby-site/cypress/e2e/integration/apps/newsdigest.cy.js +++ b/site/gatsby-site/cypress/e2e/integration/apps/newsdigest.cy.js @@ -63,6 +63,19 @@ describe('News Digest', () => { newsArticles ); + cy.conditionalIntercept( + '**/graphql', + (req) => req.body.operationName == 'UpdateCandidate', + 'UpdateCandidate', + { + data: { + updateOneCandidate: { + url: 'https://dummy.com', + }, + }, + } + ); + cy.visit(url); cy.get('[data-cy="results"] [data-cy="candidate-card"] [data-cy="candidate-dropdown"]', {