GitHub PullRequestEvent at 2014-04-23 14:42:16
Repository: ember-testing-httpRespond
Actor: trek
Payload: {"action":"closed","number":13,"pull_request":{"url":"https://api.github.com/repos/trek/ember-testing-httpRespond/pulls/13","id":13503928,"html_url":"https://github.com/trek/ember-testing-httpRespond/pull/13","diff_url":"https://github.com/trek/ember-testing-httpRespond/pull/13.diff","patch_url":"https://github.com/trek/ember-testing-httpRespond/pull/13.patch","issue_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/issues/13","number":13,"state":"closed","title":"Add new helper visitAndRespond to fix issues with Ember >= 1.4.0.","user":{"login":"rjackson","id":12637,"avatar_url":"https://avatars.githubusercontent.com/u/12637?","gravatar_id":"0dfd10ad198ae5a87640da046a77a90a","url":"https://api.github.com/users/rjackson","html_url":"https://github.com/rjackson","followers_url":"https://api.github.com/users/rjackson/followers","following_url":"https://api.github.com/users/rjackson/following{/other_user}","gists_url":"https://api.github.com/users/rjackson/gists{/gist_id}","starred_url":"https://api.github.com/users/rjackson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjackson/subscriptions","organizations_url":"https://api.github.com/users/rjackson/orgs","repos_url":"https://api.github.com/users/rjackson/repos","events_url":"https://api.github.com/users/rjackson/events{/privacy}","received_events_url":"https://api.github.com/users/rjackson/received_events","type":"User","site_admin":false},"body":"Details from #10:\r\n\r\n1. The `wait` helper in `ember-testing` is intended to wait for the routing transition to be completed (See [here](https://github.com/emberjs/ember.js/blob/master/packages_es6/ember-testing/lib/helpers.js#L146-148)).  \r\n2. `httpRespond` is setup via `registerAsyncHelper`. \r\n3. An async helper from the perspective of the `ember-testing` package chains off of the previous promise. \r\n4. Because of the above, `httpRespond` never gets a chance to respond, and causes the test to hang (waiting on the router to resolve its promise which will never happen because httpRespond was responsible for resolving it).\r\n\r\nThe reason this worked up until https://github.com/emberjs/ember.js/pull/4347, was that the router was completely refactored (prior to 1.0.0-rc.6) and the flag that `ember-testing` was previously checking `router.isLoading` was NEVER set so it was always false (and therefore would never wait for the routers transition to resolve).  The change made in that PR was a good change, and brought the `wait` helper back inline with what I assume was its intent all along.\r\n\r\n---------\r\n\r\nOK, all that said, I have a solution, but it isn't API compatible with the prior versions.  Basically, we need to have the `visit` AND the `httpRespond` bundled together in a single async helper.  This allows us to kick off the router transition, and then handle the canned response before calling `wait` (and only `wait`'ing at the end of both).\r\n\r\nThis may or may not be an acceptable solution to @trek, but it should work and resolve the issue reported in #10.\r\n\r\n--------\r\n\r\nFixes #10.","created_at":"2014-03-13T02:04:06Z","updated_at":"2014-04-23T14:42:16Z","closed_at":"2014-04-23T14:42:16Z","merged_at":"2014-04-23T14:42:16Z","merge_commit_sha":"332016532062e41d15c483dba562ab62ed707276","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/pulls/13/commits","review_comments_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/pulls/13/comments","review_comment_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/pulls/comments/{number}","comments_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/issues/13/comments","statuses_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/statuses/fa57b55456544462022b7de19902cfc0fc776ee2","head":{"label":"rjackson:fixish-1-4+","ref":"fixish-1-4+","sha":"fa57b55456544462022b7de19902cfc0fc776ee2","user":{"login":"rjackson","id":12637,"avatar_url":"https://avatars.githubusercontent.com/u/12637?","gravatar_id":"0dfd10ad198ae5a87640da046a77a90a","url":"https://api.github.com/users/rjackson","html_url":"https://github.com/rjackson","followers_url":"https://api.github.com/users/rjackson/followers","following_url":"https://api.github.com/users/rjackson/following{/other_user}","gists_url":"https://api.github.com/users/rjackson/gists{/gist_id}","starred_url":"https://api.github.com/users/rjackson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjackson/subscriptions","organizations_url":"https://api.github.com/users/rjackson/orgs","repos_url":"https://api.github.com/users/rjackson/repos","events_url":"https://api.github.com/users/rjackson/events{/privacy}","received_events_url":"https://api.github.com/users/rjackson/received_events","type":"User","site_admin":false},"repo":{"id":15112301,"name":"ember-testing-httpRespond","full_name":"rjackson/ember-testing-httpRespond","owner":{"login":"rjackson","id":12637,"avatar_url":"https://avatars.githubusercontent.com/u/12637?","gravatar_id":"0dfd10ad198ae5a87640da046a77a90a","url":"https://api.github.com/users/rjackson","html_url":"https://github.com/rjackson","followers_url":"https://api.github.com/users/rjackson/followers","following_url":"https://api.github.com/users/rjackson/following{/other_user}","gists_url":"https://api.github.com/users/rjackson/gists{/gist_id}","starred_url":"https://api.github.com/users/rjackson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjackson/subscriptions","organizations_url":"https://api.github.com/users/rjackson/orgs","repos_url":"https://api.github.com/users/rjackson/repos","events_url":"https://api.github.com/users/rjackson/events{/privacy}","received_events_url":"https://api.github.com/users/rjackson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rjackson/ember-testing-httpRespond","description":"A testing helper for Ember that lets you control the XHR request/response cycle","fork":true,"url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond","forks_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/forks","keys_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/teams","hooks_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/hooks","issue_events_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/issues/events{/number}","events_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/events","assignees_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/assignees{/user}","branches_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/branches{/branch}","tags_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/tags","blobs_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/git/refs{/sha}","trees_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/statuses/{sha}","languages_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/languages","stargazers_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/stargazers","contributors_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/contributors","subscribers_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/subscribers","subscription_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/subscription","commits_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/commits{/sha}","git_commits_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/git/commits{/sha}","comments_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/comments{/number}","issue_comment_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/issues/comments/{number}","contents_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/contents/{+path}","compare_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/merges","archive_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/downloads","issues_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/issues{/number}","pulls_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/pulls{/number}","milestones_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/milestones{/number}","notifications_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/labels{/name}","releases_url":"https://api.github.com/repos/rjackson/ember-testing-httpRespond/releases{/id}","created_at":"2013-12-11T16:20:09Z","updated_at":"2014-04-23T14:42:16Z","pushed_at":"2014-03-13T02:03:34Z","git_url":"git://github.com/rjackson/ember-testing-httpRespond.git","ssh_url":"git@github.com:rjackson/ember-testing-httpRespond.git","clone_url":"https://github.com/rjackson/ember-testing-httpRespond.git","svn_url":"https://github.com/rjackson/ember-testing-httpRespond","homepage":"","size":131,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"trek:master","ref":"master","sha":"06fb5158c4c206a1c1818620d56c74c90592de7a","user":{"login":"trek","id":9736,"avatar_url":"https://avatars.githubusercontent.com/u/9736?","gravatar_id":"1764a8db261a619b1a8e35c9498c0edf","url":"https://api.github.com/users/trek","html_url":"https://github.com/trek","followers_url":"https://api.github.com/users/trek/followers","following_url":"https://api.github.com/users/trek/following{/other_user}","gists_url":"https://api.github.com/users/trek/gists{/gist_id}","starred_url":"https://api.github.com/users/trek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trek/subscriptions","organizations_url":"https://api.github.com/users/trek/orgs","repos_url":"https://api.github.com/users/trek/repos","events_url":"https://api.github.com/users/trek/events{/privacy}","received_events_url":"https://api.github.com/users/trek/received_events","type":"User","site_admin":false},"repo":{"id":13352986,"name":"ember-testing-httpRespond","full_name":"trek/ember-testing-httpRespond","owner":{"login":"trek","id":9736,"avatar_url":"https://avatars.githubusercontent.com/u/9736?","gravatar_id":"1764a8db261a619b1a8e35c9498c0edf","url":"https://api.github.com/users/trek","html_url":"https://github.com/trek","followers_url":"https://api.github.com/users/trek/followers","following_url":"https://api.github.com/users/trek/following{/other_user}","gists_url":"https://api.github.com/users/trek/gists{/gist_id}","starred_url":"https://api.github.com/users/trek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trek/subscriptions","organizations_url":"https://api.github.com/users/trek/orgs","repos_url":"https://api.github.com/users/trek/repos","events_url":"https://api.github.com/users/trek/events{/privacy}","received_events_url":"https://api.github.com/users/trek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/trek/ember-testing-httpRespond","description":"A testing helper for Ember that lets you control the XHR request/response cycle","fork":false,"url":"https://api.github.com/repos/trek/ember-testing-httpRespond","forks_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/forks","keys_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/teams","hooks_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/hooks","issue_events_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/issues/events{/number}","events_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/events","assignees_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/assignees{/user}","branches_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/branches{/branch}","tags_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/tags","blobs_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/git/refs{/sha}","trees_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/statuses/{sha}","languages_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/languages","stargazers_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/stargazers","contributors_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/contributors","subscribers_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/subscribers","subscription_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/subscription","commits_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/commits{/sha}","git_commits_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/git/commits{/sha}","comments_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/comments{/number}","issue_comment_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/issues/comments/{number}","contents_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/contents/{+path}","compare_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/merges","archive_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/downloads","issues_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/issues{/number}","pulls_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/pulls{/number}","milestones_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/milestones{/number}","notifications_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/labels{/name}","releases_url":"https://api.github.com/repos/trek/ember-testing-httpRespond/releases{/id}","created_at":"2013-10-05T21:39:57Z","updated_at":"2014-04-23T14:42:16Z","pushed_at":"2014-04-23T14:42:16Z","git_url":"git://github.com/trek/ember-testing-httpRespond.git","ssh_url":"git@github.com:trek/ember-testing-httpRespond.git","clone_url":"https://github.com/trek/ember-testing-httpRespond.git","svn_url":"https://github.com/trek/ember-testing-httpRespond","homepage":"","size":398,"stargazers_count":31,"watchers_count":31,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":12,"mirror_url":null,"open_issues_count":3,"forks":12,"open_issues":3,"watchers":31,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/trek/ember-testing-httpRespond/pulls/13"},"html":{"href":"https://github.com/trek/ember-testing-httpRespond/pull/13"},"issue":{"href":"https://api.github.com/repos/trek/ember-testing-httpRespond/issues/13"},"comments":{"href":"https://api.github.com/repos/trek/ember-testing-httpRespond/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/trek/ember-testing-httpRespond/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/trek/ember-testing-httpRespond/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/trek/ember-testing-httpRespond/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/trek/ember-testing-httpRespond/statuses/fa57b55456544462022b7de19902cfc0fc776ee2"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"trek","id":9736,"avatar_url":"https://avatars.githubusercontent.com/u/9736?","gravatar_id":"1764a8db261a619b1a8e35c9498c0edf","url":"https://api.github.com/users/trek","html_url":"https://github.com/trek","followers_url":"https://api.github.com/users/trek/followers","following_url":"https://api.github.com/users/trek/following{/other_user}","gists_url":"https://api.github.com/users/trek/gists{/gist_id}","starred_url":"https://api.github.com/users/trek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trek/subscriptions","organizations_url":"https://api.github.com/users/trek/orgs","repos_url":"https://api.github.com/users/trek/repos","events_url":"https://api.github.com/users/trek/events{/privacy}","received_events_url":"https://api.github.com/users/trek/received_events","type":"User","site_admin":false},"comments":7,"review_comments":0,"commits":1,"additions":23,"deletions":6,"changed_files":1}}