Damn you're right @mattwr18

You are right with this statement: https://github.com/Human-Connection/Human-Connection/pull/1280#discussion_r314675882
This commit is contained in:
roschaefer 2019-08-16 16:53:38 +02:00
parent fdc0d808f6
commit b27a01438e

View File

@ -260,7 +260,7 @@ Then("the first post on the landing page has the title:", title => {
Then( Then(
"the page {string} returns a 404 error with a message:", "the page {string} returns a 404 error with a message:",
(route, 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.visit(route, { failOnStatusCode: false });
cy.get(".error").should("contain", message); cy.get(".error").should("contain", message);
} }