{"action":"closed","issue":{"url":"https://api.github.com/repos/DevExpress/testcafe/issues/2336","repository_url":"https://api.github.com/repos/DevExpress/testcafe","labels_url":"https://api.github.com/repos/DevExpress/testcafe/issues/2336/labels{/name}","comments_url":"https://api.github.com/repos/DevExpress/testcafe/issues/2336/comments","events_url":"https://api.github.com/repos/DevExpress/testcafe/issues/2336/events","html_url":"https://github.com/DevExpress/testcafe/issues/2336","id":316469270,"number":2336,"title":"RequestMock does not send response","user":{"login":"flec","id":2362414,"avatar_url":"https://avatars0.githubusercontent.com/u/2362414?v=4","gravatar_id":"","url":"https://api.github.com/users/flec","html_url":"https://github.com/flec","followers_url":"https://api.github.com/users/flec/followers","following_url":"https://api.github.com/users/flec/following{/other_user}","gists_url":"https://api.github.com/users/flec/gists{/gist_id}","starred_url":"https://api.github.com/users/flec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flec/subscriptions","organizations_url":"https://api.github.com/users/flec/orgs","repos_url":"https://api.github.com/users/flec/repos","events_url":"https://api.github.com/users/flec/events{/privacy}","received_events_url":"https://api.github.com/users/flec/received_events","type":"User","site_admin":false},"labels":[{"id":243973407,"url":"https://api.github.com/repos/DevExpress/testcafe/labels/SYSTEM:%20hammerhead","name":"SYSTEM: hammerhead","color":"bfe5bf","default":false}],"state":"closed","locked":false,"assignee":{"login":"miherlosev","id":4133518,"avatar_url":"https://avatars2.githubusercontent.com/u/4133518?v=4","gravatar_id":"","url":"https://api.github.com/users/miherlosev","html_url":"https://github.com/miherlosev","followers_url":"https://api.github.com/users/miherlosev/followers","following_url":"https://api.github.com/users/miherlosev/following{/other_user}","gists_url":"https://api.github.com/users/miherlosev/gists{/gist_id}","starred_url":"https://api.github.com/users/miherlosev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miherlosev/subscriptions","organizations_url":"https://api.github.com/users/miherlosev/orgs","repos_url":"https://api.github.com/users/miherlosev/repos","events_url":"https://api.github.com/users/miherlosev/events{/privacy}","received_events_url":"https://api.github.com/users/miherlosev/received_events","type":"User","site_admin":false},"assignees":[{"login":"miherlosev","id":4133518,"avatar_url":"https://avatars2.githubusercontent.com/u/4133518?v=4","gravatar_id":"","url":"https://api.github.com/users/miherlosev","html_url":"https://github.com/miherlosev","followers_url":"https://api.github.com/users/miherlosev/followers","following_url":"https://api.github.com/users/miherlosev/following{/other_user}","gists_url":"https://api.github.com/users/miherlosev/gists{/gist_id}","starred_url":"https://api.github.com/users/miherlosev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miherlosev/subscriptions","organizations_url":"https://api.github.com/users/miherlosev/orgs","repos_url":"https://api.github.com/users/miherlosev/repos","events_url":"https://api.github.com/users/miherlosev/events{/privacy}","received_events_url":"https://api.github.com/users/miherlosev/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/DevExpress/testcafe/milestones/25","html_url":"https://github.com/DevExpress/testcafe/milestone/25","labels_url":"https://api.github.com/repos/DevExpress/testcafe/milestones/25/labels","id":2972285,"number":25,"title":"Sprint #11","description":"","creator":{"login":"AlexanderMoskovkin","id":12047804,"avatar_url":"https://avatars0.githubusercontent.com/u/12047804?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexanderMoskovkin","html_url":"https://github.com/AlexanderMoskovkin","followers_url":"https://api.github.com/users/AlexanderMoskovkin/followers","following_url":"https://api.github.com/users/AlexanderMoskovkin/following{/other_user}","gists_url":"https://api.github.com/users/AlexanderMoskovkin/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexanderMoskovkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexanderMoskovkin/subscriptions","organizations_url":"https://api.github.com/users/AlexanderMoskovkin/orgs","repos_url":"https://api.github.com/users/AlexanderMoskovkin/repos","events_url":"https://api.github.com/users/AlexanderMoskovkin/events{/privacy}","received_events_url":"https://api.github.com/users/AlexanderMoskovkin/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":20,"state":"open","created_at":"2017-12-11T17:10:05Z","updated_at":"2018-04-26T12:11:18Z","due_on":"2018-04-27T07:00:00Z","closed_at":null},"comments":1,"created_at":"2018-04-21T07:15:31Z","updated_at":"2018-04-26T12:11:18Z","closed_at":"2018-04-26T12:11:18Z","author_association":"NONE","body":"### Are you requesting a feature or reporting a bug?\r\n\r\nBug\r\n\r\n### What is the current behavior?\r\n\r\nThe RequestMock does not send a response by using `respond`, there is a unhandled promise rejection.\r\n```\r\n(node:1812) UnhandledPromiseRejectionWarning: TypeError: ctx.destRes.pipe is not a function\r\n    at Object.decideOnProcessingStrategy (C:\\dev\\tc\\node_modules\\testcafe-hammerhead\\lib\\request-pipeline\\index.js:172:33)\r\n    at next (C:\\dev\\tc\\node_modules\\testcafe-hammerhead\\lib\\request-pipeline\\index.js:386:38)\r\n    at Object.checkSameOriginPolicyCompliance (C:\\dev\\tc\\node_modules\\testcafe-hammerhead\\lib\\request-pipeline\\index.js:148:9)\r\n    at next (C:\\dev\\tc\\node_modules\\testcafe-hammerhead\\lib\\request-pipeline\\index.js:386:38)\r\n    at Object.sendDestinationRequest (C:\\dev\\tc\\node_modules\\testcafe-hammerhead\\lib\\request-pipeline\\index.js:135:17)\r\n    at next (C:\\dev\\tc\\node_modules\\testcafe-hammerhead\\lib\\request-pipeline\\index.js:386:38)\r\n    at Object.<anonymous> (C:\\dev\\tc\\node_modules\\testcafe-hammerhead\\lib\\request-pipeline\\index.js:106:13)\r\n    at Generator.next (<anonymous>)\r\n    at step (C:\\dev\\tc\\node_modules\\testcafe-hammerhead\\lib\\request-pipeline\\index.js:94:191)\r\n    at C:\\dev\\tc\\node_modules\\testcafe-hammerhead\\lib\\request-pipeline\\index.js:94:361\r\n(node:1812) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)\r\n(node:1812) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.\r\n```\r\n\r\n### What is the expected behavior?\r\n\r\nThe response should be sent\r\n\r\n### How would you reproduce the current behavior (if this is a bug)?\r\n\r\nUsing the code below with `testcafe chrome`\r\n\r\n#### Provide the test code and the tested page URL (if applicable)\r\n\r\nTested page URL: https://phppot.com/demo/jquery-ajax-autocomplete-country-example/\r\n\r\nTest code\r\n\r\n```js\r\nimport { Selector, RequestMock } from 'testcafe'\r\n\r\nconst requestMock = RequestMock()\r\n    .onRequestTo('https://phppot.com/demo/jquery-ajax-autocomplete-country-example/readCountry.php')\r\n    .respond(`<ul id=\"country-list\"><li onClick=\"selectCountry('Sweden')\">Sweden</li><li onClick=\"selectCountry('Switzerland')\">Switzerland</li></ul>`)\r\n\r\nfixture`Getting Started`\r\n    .page`https://phppot.com/demo/jquery-ajax-autocomplete-country-example/`\r\n    .requestHooks(requestMock)\r\n\r\ntest('My first test', async t => {\r\n    await t\r\n        .typeText('#search-box', 's')\r\n        .expect(Selector('#country-list li:first-child').innerText).eql('Sweden')\r\n})\r\n```\r\n\r\n### Specify your\r\n\r\n* operating system: Windows 10.0.0\r\n* browser and version: Chrome 65.0.3325\r\n* testcafe version: 0.20.0-alpha.1\r\n* node.js version: 8.11.1"}}
{"actor":{"display_login":"AndreyBelym"}}