{"action":"created","issue":{"url":"https://api.github.com/repos/cypress-io/cypress/issues/2825","repository_url":"https://api.github.com/repos/cypress-io/cypress","labels_url":"https://api.github.com/repos/cypress-io/cypress/issues/2825/labels{/name}","comments_url":"https://api.github.com/repos/cypress-io/cypress/issues/2825/comments","events_url":"https://api.github.com/repos/cypress-io/cypress/issues/2825/events","html_url":"https://github.com/cypress-io/cypress/issues/2825","id":383547548,"node_id":"MDU6SXNzdWUzODM1NDc1NDg=","number":2825,"title":"Test passes when loading a page which returns 500","user":{"login":"trygveaa","id":601966,"node_id":"MDQ6VXNlcjYwMTk2Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/601966?v=4","gravatar_id":"","url":"https://api.github.com/users/trygveaa","html_url":"https://github.com/trygveaa","followers_url":"https://api.github.com/users/trygveaa/followers","following_url":"https://api.github.com/users/trygveaa/following{/other_user}","gists_url":"https://api.github.com/users/trygveaa/gists{/gist_id}","starred_url":"https://api.github.com/users/trygveaa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trygveaa/subscriptions","organizations_url":"https://api.github.com/users/trygveaa/orgs","repos_url":"https://api.github.com/users/trygveaa/repos","events_url":"https://api.github.com/users/trygveaa/events{/privacy}","received_events_url":"https://api.github.com/users/trygveaa/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-22T13:58:57Z","updated_at":"2018-11-26T08:55:20Z","closed_at":"2018-11-26T08:55:20Z","author_association":"NONE","body":"### Current behavior:\r\n\r\nIf a page which is navigated to during a test returns HTTP status 500, the test still passes.\r\n\r\nNote that the test does fail when visiting the page directly with `.visit`, it only passes when loaded by normal navigation, e.g. by clicking a link or submitting a form.\r\n\r\n### Desired behavior:\r\n\r\nI think the test should fail when a HTTP error is encountered on page load.\r\n\r\n### Steps to reproduce:\r\n\r\nThis test reproduces the issue:\r\n\r\n```js\r\ndescribe('500 test', () => {\r\n    it('should fail', () => {\r\n        cy.visit('/');\r\n        cy.get('[href=\"/500\"]').click();\r\n    });\r\n});\r\n```\r\n\r\nWith this config:\r\n\r\n```js\r\n{\r\n    \"baseUrl\": \"https://httpstat.us/\",\r\n    \"chromeWebSecurity\": false\r\n}\r\n```\r\n\r\nNote that I had to disable web security for this particular page, otherwise I get a cross origin error. Since it is a relative link, that shouldn't be necessary. But if I test with a my own page, I don't get a cross origin error, so this seems to be a separate issue.\r\n\r\n### Versions\r\n\r\nCypress 3.1.2 using the embedded Electron 59 on Arch Linux."},"comment":{"url":"https://api.github.com/repos/cypress-io/cypress/issues/comments/441562974","html_url":"https://github.com/cypress-io/cypress/issues/2825#issuecomment-441562974","issue_url":"https://api.github.com/repos/cypress-io/cypress/issues/2825","id":441562974,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTU2Mjk3NA==","user":{"login":"jennifer-shehane","id":1271364,"node_id":"MDQ6VXNlcjEyNzEzNjQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1271364?v=4","gravatar_id":"","url":"https://api.github.com/users/jennifer-shehane","html_url":"https://github.com/jennifer-shehane","followers_url":"https://api.github.com/users/jennifer-shehane/followers","following_url":"https://api.github.com/users/jennifer-shehane/following{/other_user}","gists_url":"https://api.github.com/users/jennifer-shehane/gists{/gist_id}","starred_url":"https://api.github.com/users/jennifer-shehane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jennifer-shehane/subscriptions","organizations_url":"https://api.github.com/users/jennifer-shehane/orgs","repos_url":"https://api.github.com/users/jennifer-shehane/repos","events_url":"https://api.github.com/users/jennifer-shehane/events{/privacy}","received_events_url":"https://api.github.com/users/jennifer-shehane/received_events","type":"User","site_admin":false},"created_at":"2018-11-26T08:55:20Z","updated_at":"2018-11-26T08:55:20Z","author_association":"MEMBER","body":"Duplicate of https://github.com/cypress-io/cypress/issues/2825\r\n\r\nThe issue already opened proposes an API to allow defined statuses that should fail any test where they occur. "}}
{"actor":{"display_login":"jennifer-shehane"}}