From 03258bc1d0bd6bc84c930484871abe92299b591e Mon Sep 17 00:00:00 2001 From: NogaNHS Date: Thu, 25 Jan 2024 12:55:51 +0000 Subject: [PATCH] cypress tests --- app/cypress/e2e/0-ndr-core-tests/feedback_page.cy.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/cypress/e2e/0-ndr-core-tests/feedback_page.cy.js b/app/cypress/e2e/0-ndr-core-tests/feedback_page.cy.js index 7f98d5515..d315ba3da 100644 --- a/app/cypress/e2e/0-ndr-core-tests/feedback_page.cy.js +++ b/app/cypress/e2e/0-ndr-core-tests/feedback_page.cy.js @@ -80,6 +80,9 @@ describe('Feedback Page', () => { fillInForm(mockInputData); cy.get('#submit-feedback').click(); + cy.intercept('POST', '/Feedback*', { + statusCode: 200, + }).as('feedback'); // TODO: when backend call for sending email is implemented, // intercept the call and check that payload data is the same as mockInputData @@ -104,7 +107,9 @@ describe('Feedback Page', () => { fillInForm(mockInputData); cy.get('#submit-feedback').click(); - + cy.intercept('POST', '/Feedback*', { + statusCode: 200, + }).as('feedback'); cy.get('.app-homepage-content h1', { timeout: 5000 }).should( 'have.text', 'We’ve received your feedback',