{"action":"created","issue":{"url":"https://api.github.com/repos/cypress-io/cypress/issues/1245","repository_url":"https://api.github.com/repos/cypress-io/cypress","labels_url":"https://api.github.com/repos/cypress-io/cypress/issues/1245/labels{/name}","comments_url":"https://api.github.com/repos/cypress-io/cypress/issues/1245/comments","events_url":"https://api.github.com/repos/cypress-io/cypress/issues/1245/events","html_url":"https://github.com/cypress-io/cypress/issues/1245","id":293497300,"number":1245,"title":"Cypress test runner redirects to __ suddenly","user":{"login":"joelgrimberg","id":2995294,"avatar_url":"https://avatars2.githubusercontent.com/u/2995294?v=4","gravatar_id":"","url":"https://api.github.com/users/joelgrimberg","html_url":"https://github.com/joelgrimberg","followers_url":"https://api.github.com/users/joelgrimberg/followers","following_url":"https://api.github.com/users/joelgrimberg/following{/other_user}","gists_url":"https://api.github.com/users/joelgrimberg/gists{/gist_id}","starred_url":"https://api.github.com/users/joelgrimberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelgrimberg/subscriptions","organizations_url":"https://api.github.com/users/joelgrimberg/orgs","repos_url":"https://api.github.com/users/joelgrimberg/repos","events_url":"https://api.github.com/users/joelgrimberg/events{/privacy}","received_events_url":"https://api.github.com/users/joelgrimberg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/cypress-io/cypress/milestones/65","html_url":"https://github.com/cypress-io/cypress/milestone/65","labels_url":"https://api.github.com/repos/cypress-io/cypress/milestones/65/labels","id":3003587,"number":65,"title":"2.0.0","description":null,"creator":{"login":"brian-mann","id":1268976,"avatar_url":"https://avatars2.githubusercontent.com/u/1268976?v=4","gravatar_id":"","url":"https://api.github.com/users/brian-mann","html_url":"https://github.com/brian-mann","followers_url":"https://api.github.com/users/brian-mann/followers","following_url":"https://api.github.com/users/brian-mann/following{/other_user}","gists_url":"https://api.github.com/users/brian-mann/gists{/gist_id}","starred_url":"https://api.github.com/users/brian-mann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brian-mann/subscriptions","organizations_url":"https://api.github.com/users/brian-mann/orgs","repos_url":"https://api.github.com/users/brian-mann/repos","events_url":"https://api.github.com/users/brian-mann/events{/privacy}","received_events_url":"https://api.github.com/users/brian-mann/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":11,"state":"open","created_at":"2017-12-29T14:12:51Z","updated_at":"2018-02-12T14:52:13Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2018-02-01T11:34:57Z","updated_at":"2018-02-12T14:52:39Z","closed_at":null,"author_association":"NONE","body":"I am building an E2E test in which I use a button / submit to go to a second page.\r\nthe submit triggers a redirect through jQuery. \r\n\r\nI tried using :\r\n```javascript\r\nCypress.on('window:before:load', (win) => {\r\n      Object.defineProperty(win, 'self', {\r\n        get: () => {\r\n          return window.top\r\n        }\r\n      })\r\n    })\r\n```\r\n\r\nI also tried using\r\n```javascript\r\ncy.visit('url', {\r\n\t\t\t onBeforeLoad: (win) => {\r\n\t\t\t Object.defineProperty(win, 'self', {\r\n\t\t\t get: () => {\r\n\t\t\t return window.top\r\n\t\t }\r\n```\r\n\r\nThe code as shown above does not work (I still get the 'whoops') for redirects behind buttons;\r\nit only works for redirects behind cy.visit as it looks.\r\n\r\n\r\n#1064 \r\n#392 \r\n#969 \r\n#992\r\n"},"comment":{"url":"https://api.github.com/repos/cypress-io/cypress/issues/comments/364945371","html_url":"https://github.com/cypress-io/cypress/issues/1245#issuecomment-364945371","issue_url":"https://api.github.com/repos/cypress-io/cypress/issues/1245","id":364945371,"user":{"login":"brian-mann","id":1268976,"avatar_url":"https://avatars2.githubusercontent.com/u/1268976?v=4","gravatar_id":"","url":"https://api.github.com/users/brian-mann","html_url":"https://github.com/brian-mann","followers_url":"https://api.github.com/users/brian-mann/followers","following_url":"https://api.github.com/users/brian-mann/following{/other_user}","gists_url":"https://api.github.com/users/brian-mann/gists{/gist_id}","starred_url":"https://api.github.com/users/brian-mann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brian-mann/subscriptions","organizations_url":"https://api.github.com/users/brian-mann/orgs","repos_url":"https://api.github.com/users/brian-mann/repos","events_url":"https://api.github.com/users/brian-mann/events{/privacy}","received_events_url":"https://api.github.com/users/brian-mann/received_events","type":"User","site_admin":false},"created_at":"2018-02-12T14:52:39Z","updated_at":"2018-02-12T14:52:39Z","author_association":"CONTRIBUTOR","body":"Fixed by https://github.com/cypress-io/cypress/pull/1295"}}
{"actor":{"display_login":"brian-mann"}}