{"action":"created","issue":{"url":"https://api.github.com/repos/cypress-io/cypress/issues/1708","repository_url":"https://api.github.com/repos/cypress-io/cypress","labels_url":"https://api.github.com/repos/cypress-io/cypress/issues/1708/labels{/name}","comments_url":"https://api.github.com/repos/cypress-io/cypress/issues/1708/comments","events_url":"https://api.github.com/repos/cypress-io/cypress/issues/1708/events","html_url":"https://github.com/cypress-io/cypress/issues/1708","id":322131702,"number":1708,"title":"cy.wait doesn't seem to be seeing PUT route call","user":{"login":"StupidIncarnate","id":276331,"avatar_url":"https://avatars3.githubusercontent.com/u/276331?v=4","gravatar_id":"","url":"https://api.github.com/users/StupidIncarnate","html_url":"https://github.com/StupidIncarnate","followers_url":"https://api.github.com/users/StupidIncarnate/followers","following_url":"https://api.github.com/users/StupidIncarnate/following{/other_user}","gists_url":"https://api.github.com/users/StupidIncarnate/gists{/gist_id}","starred_url":"https://api.github.com/users/StupidIncarnate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StupidIncarnate/subscriptions","organizations_url":"https://api.github.com/users/StupidIncarnate/orgs","repos_url":"https://api.github.com/users/StupidIncarnate/repos","events_url":"https://api.github.com/users/StupidIncarnate/events{/privacy}","received_events_url":"https://api.github.com/users/StupidIncarnate/received_events","type":"User","site_admin":false},"labels":[{"id":393988405,"url":"https://api.github.com/repos/cypress-io/cypress/labels/stage:%20needs%20information","name":"stage: needs information","color":"ffdf7f","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-11T00:43:55Z","updated_at":"2018-05-11T22:11:10Z","closed_at":null,"author_association":"NONE","body":"I set up a cy.route and am waiting for it to fire, but the wait times out, even if I extend the timeout. I'm seeing the request in the console so I'm sure it's happening. \r\n\r\n### Current behavior: \r\nTest:\r\n![image](https://user-images.githubusercontent.com/276331/39900757-a4beff0c-5489-11e8-94e0-dfd2b1143896.png)\r\n\r\nGUI\r\n![image](https://user-images.githubusercontent.com/276331/39900865-631a39b2-548a-11e8-8e07-42dae5c8bbeb.png)\r\n\r\n![image](https://user-images.githubusercontent.com/276331/39900791-ec20779a-5489-11e8-916a-ecda735d4fd5.png)\r\n![image](https://user-images.githubusercontent.com/276331/39901083-e2a0c66e-548b-11e8-80f4-cb90e065fd51.png)\r\n\r\nI can see the request finish before the wait times out, so I'm at a loss. \r\n\r\n### Desired behavior:\r\nFor cy.wait to succeed after a PUT call is made. \r\n\r\n### Steps to reproduce:\r\n\r\n\r\n```js\r\nlet regexPath = new RegExp(\"save\");\r\n\t\tcy.server();\r\n\t\tcy.route(\"PUT\", regexPath).as(\"saveModel\");\r\n\r\n\t\tcy.get(`.new-model-property [data-cy=\"property-name\"] input`).type(\"mainProp\");\r\n\t\tcy.get(`.new-model-property [data-cy=\"property-data-type\"] input`).type(\"Text\").blur();\r\n\r\n\t\tcy.get(\".new-model-property\").should(\"have.length\", 1);\r\n\t\tcy.get(\".property\").should(\"have.length\", 2);\r\n\t\tcy.get(`.property:not(.new-model-property) [data-cy=\"property-name\"] input`).should(\"have.value\", \"mainProp\");\r\n\t\tcy.get(`.property:not(.new-model-property) [data-cy=\"property-data-type\"]`).should(\"contain\", \"text\");\r\n\r\n\t\t/**\r\n\t\t *  Did it save?\r\n\t\t */\r\n\r\n\t\tcy.wait(\"@saveModel\");\r\n```\r\n\r\n### Versions \r\nCypress: 2.1.0\r\nChrome: v66\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/cypress-io/cypress/issues/comments/388498329","html_url":"https://github.com/cypress-io/cypress/issues/1708#issuecomment-388498329","issue_url":"https://api.github.com/repos/cypress-io/cypress/issues/1708","id":388498329,"user":{"login":"StupidIncarnate","id":276331,"avatar_url":"https://avatars3.githubusercontent.com/u/276331?v=4","gravatar_id":"","url":"https://api.github.com/users/StupidIncarnate","html_url":"https://github.com/StupidIncarnate","followers_url":"https://api.github.com/users/StupidIncarnate/followers","following_url":"https://api.github.com/users/StupidIncarnate/following{/other_user}","gists_url":"https://api.github.com/users/StupidIncarnate/gists{/gist_id}","starred_url":"https://api.github.com/users/StupidIncarnate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StupidIncarnate/subscriptions","organizations_url":"https://api.github.com/users/StupidIncarnate/orgs","repos_url":"https://api.github.com/users/StupidIncarnate/repos","events_url":"https://api.github.com/users/StupidIncarnate/events{/privacy}","received_events_url":"https://api.github.com/users/StupidIncarnate/received_events","type":"User","site_admin":false},"created_at":"2018-05-11T22:11:10Z","updated_at":"2018-05-11T22:11:10Z","author_association":"NONE","body":"It looks like something to do with [requestjs](https://www.npmjs.com/package/request). All my server calls go through that package. I switched to doing a GET call in jquery and cypress was able to pick it up. Requestjs GET exhibited the same timeout error.  \r\n\r\nJQUERY GET REQUEST \r\n![image](https://user-images.githubusercontent.com/276331/39948798-3bc13916-553d-11e8-9640-731ff4e7e976.png)\r\n![image](https://user-images.githubusercontent.com/276331/39948742-fa9e1120-553c-11e8-9d2f-deee751669b1.png)\r\n\r\nREQUESTJS GET REQUEST\r\n![image](https://user-images.githubusercontent.com/276331/39948815-4ca94bd8-553d-11e8-86e9-10599f58ba8f.png)\r\n![image](https://user-images.githubusercontent.com/276331/39948882-973e317c-553d-11e8-8768-16f393a76037.png)\r\n\r\nThe only differences I see there is jquery doesn't have the X-requested-with header, and has accept: */* instead of accept: application/json. Do you know what that means or do those look like they can cause issues with cypress picking up on things? \r\n\r\n"}}
{"actor":{"display_login":"StupidIncarnate"}}