From b27a01438ed4255091c2f6badf2de4fa143cfeca Mon Sep 17 00:00:00 2001 From: roschaefer Date: Fri, 16 Aug 2019 16:53:38 +0200 Subject: [PATCH] Damn you're right @mattwr18 You are right with this statement: https://github.com/Human-Connection/Human-Connection/pull/1280#discussion_r314675882 --- cypress/integration/common/steps.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/integration/common/steps.js b/cypress/integration/common/steps.js index e1eab98c1..cc5d0551a 100644 --- a/cypress/integration/common/steps.js +++ b/cypress/integration/common/steps.js @@ -260,7 +260,7 @@ Then("the first post on the landing page has the title:", title => { Then( "the page {string} returns a 404 error with a message:", (route, message) => { - // TODO: how can we check HTTP codes with cypress? + cy.request({ url: route, failOnStatusCode: false }).its('status').should('eq', 404) cy.visit(route, { failOnStatusCode: false }); cy.get(".error").should("contain", message); }