{"action":"created","comment":{"url":"https://api.github.com/repos/artsy/reaction/pulls/comments/241181240","pull_request_review_id":184389932,"id":241181240,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MTE4MTI0MA==","diff_hunk":"@@ -210,6 +211,25 @@ describe(\"Offer InitialMutation\", () => {\n       )\n     })\n \n+    it(\"Logging an error with an unrecognized action\", () => {\n+      const component = getWrapper()\n+      const declineRadio = component.find(BorderedRadio).last()\n+\n+      declineRadio\n+        .props()\n+        .onSelect({ selected: true, value: \"UNRECOGNIZED VALUE\" })\n+\n+      component\n+        .find(Button)\n+        .last()\n+        .props()\n+        .onClick({})\n+\n+      expect(logger.error).toHaveBeenCalledWith(","path":"src/Apps/Order/Routes/__tests__/Respond.test.tsx","position":39,"original_position":39,"commit_id":"e746929e5e75fdb63ad8befe3ab6ec2fc5a5b80c","original_commit_id":"e746929e5e75fdb63ad8befe3ab6ec2fc5a5b80c","user":{"login":"sweir27","id":2081340,"node_id":"MDQ6VXNlcjIwODEzNDA=","avatar_url":"https://avatars3.githubusercontent.com/u/2081340?v=4","gravatar_id":"","url":"https://api.github.com/users/sweir27","html_url":"https://github.com/sweir27","followers_url":"https://api.github.com/users/sweir27/followers","following_url":"https://api.github.com/users/sweir27/following{/other_user}","gists_url":"https://api.github.com/users/sweir27/gists{/gist_id}","starred_url":"https://api.github.com/users/sweir27/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sweir27/subscriptions","organizations_url":"https://api.github.com/users/sweir27/orgs","repos_url":"https://api.github.com/users/sweir27/repos","events_url":"https://api.github.com/users/sweir27/events{/privacy}","received_events_url":"https://api.github.com/users/sweir27/received_events","type":"User","site_admin":false},"body":"@pepopowitz we do not have \"end-to-end\" tests in the app! 😞 The closest we currently have is the router tests, which visit a route and _can_ assert what's shown on the page.\r\n\r\nThis case seems rare (is it even possible?) so it seems like we have a few options:\r\n- Show a generic error modal (we can test that this appears, as we do elsewhere)\r\n- Default to an action like \"accept\" (since it just kicks them to the review screen, there's not much danger here)","created_at":"2018-12-12T20:53:26Z","updated_at":"2018-12-12T20:53:26Z","html_url":"https://github.com/artsy/reaction/pull/1677#discussion_r241181240","pull_request_url":"https://api.github.com/repos/artsy/reaction/pulls/1677","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/artsy/reaction/pulls/comments/241181240"},"html":{"href":"https://github.com/artsy/reaction/pull/1677#discussion_r241181240"},"pull_request":{"href":"https://api.github.com/repos/artsy/reaction/pulls/1677"}},"in_reply_to_id":241169592},"pull_request":{"url":"https://api.github.com/repos/artsy/reaction/pulls/1677","id":237852886,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3ODUyODg2","html_url":"https://github.com/artsy/reaction/pull/1677","diff_url":"https://github.com/artsy/reaction/pull/1677.diff","patch_url":"https://github.com/artsy/reaction/pull/1677.patch","issue_url":"https://api.github.com/repos/artsy/reaction/issues/1677","number":1677,"state":"open","locked":false,"title":"Add accept offer mutation and corresponding status screen","user":{"login":"williardx","id":4432348,"node_id":"MDQ6VXNlcjQ0MzIzNDg=","avatar_url":"https://avatars1.githubusercontent.com/u/4432348?v=4","gravatar_id":"","url":"https://api.github.com/users/williardx","html_url":"https://github.com/williardx","followers_url":"https://api.github.com/users/williardx/followers","following_url":"https://api.github.com/users/williardx/following{/other_user}","gists_url":"https://api.github.com/users/williardx/gists{/gist_id}","starred_url":"https://api.github.com/users/williardx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/williardx/subscriptions","organizations_url":"https://api.github.com/users/williardx/orgs","repos_url":"https://api.github.com/users/williardx/repos","events_url":"https://api.github.com/users/williardx/events{/privacy}","received_events_url":"https://api.github.com/users/williardx/received_events","type":"User","site_admin":false},"body":"Done in collaboration with @pepopowitz !\r\n\r\nOn clicking submit on `/orders/$orderId/review/accept`, we send a mutation that accepts the offer and navigates to the correct status screen.\r\n\r\nResolves [PURCHASE-680](https://artsyproduct.atlassian.net/browse/PURCHASE-680) and [PURCHASE-710](https://artsyproduct.atlassian.net/browse/PURCHASE-710)\r\n\r\n### What Changed\r\n- Adds mutation to accept an offer and error handling for failed mutations\r\n- On successful mutation, navigates to  `/orders/$orderId/status` with the correct status header and message for an accepted offer\r\n- Cleans up code according to comments in https://github.com/artsy/reaction/pull/1647:\r\n  - Corrects URL from `/orders/$orderId/accept` to `/orders/$orderId/review/accept`\r\n  - Adds `cacheConfig: { force: true }` to `review/accept` route in `routes.tsx`\r\n  - Logs an error instead of running `window.alert` if no action is recognized on pressing \"continue\" on the offer respond view","created_at":"2018-12-11T22:43:20Z","updated_at":"2018-12-12T20:53:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4ff54476f63b7440aaf1f9aba2e40af1925cfe85","assignee":{"login":"ds300","id":1242537,"node_id":"MDQ6VXNlcjEyNDI1Mzc=","avatar_url":"https://avatars2.githubusercontent.com/u/1242537?v=4","gravatar_id":"","url":"https://api.github.com/users/ds300","html_url":"https://github.com/ds300","followers_url":"https://api.github.com/users/ds300/followers","following_url":"https://api.github.com/users/ds300/following{/other_user}","gists_url":"https://api.github.com/users/ds300/gists{/gist_id}","starred_url":"https://api.github.com/users/ds300/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ds300/subscriptions","organizations_url":"https://api.github.com/users/ds300/orgs","repos_url":"https://api.github.com/users/ds300/repos","events_url":"https://api.github.com/users/ds300/events{/privacy}","received_events_url":"https://api.github.com/users/ds300/received_events","type":"User","site_admin":false},"assignees":[{"login":"ds300","id":1242537,"node_id":"MDQ6VXNlcjEyNDI1Mzc=","avatar_url":"https://avatars2.githubusercontent.com/u/1242537?v=4","gravatar_id":"","url":"https://api.github.com/users/ds300","html_url":"https://github.com/ds300","followers_url":"https://api.github.com/users/ds300/followers","following_url":"https://api.github.com/users/ds300/following{/other_user}","gists_url":"https://api.github.com/users/ds300/gists{/gist_id}","starred_url":"https://api.github.com/users/ds300/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ds300/subscriptions","organizations_url":"https://api.github.com/users/ds300/orgs","repos_url":"https://api.github.com/users/ds300/repos","events_url":"https://api.github.com/users/ds300/events{/privacy}","received_events_url":"https://api.github.com/users/ds300/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"pepopowitz","id":1627089,"node_id":"MDQ6VXNlcjE2MjcwODk=","avatar_url":"https://avatars3.githubusercontent.com/u/1627089?v=4","gravatar_id":"","url":"https://api.github.com/users/pepopowitz","html_url":"https://github.com/pepopowitz","followers_url":"https://api.github.com/users/pepopowitz/followers","following_url":"https://api.github.com/users/pepopowitz/following{/other_user}","gists_url":"https://api.github.com/users/pepopowitz/gists{/gist_id}","starred_url":"https://api.github.com/users/pepopowitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pepopowitz/subscriptions","organizations_url":"https://api.github.com/users/pepopowitz/orgs","repos_url":"https://api.github.com/users/pepopowitz/repos","events_url":"https://api.github.com/users/pepopowitz/events{/privacy}","received_events_url":"https://api.github.com/users/pepopowitz/received_events","type":"User","site_admin":false},{"login":"sweir27","id":2081340,"node_id":"MDQ6VXNlcjIwODEzNDA=","avatar_url":"https://avatars3.githubusercontent.com/u/2081340?v=4","gravatar_id":"","url":"https://api.github.com/users/sweir27","html_url":"https://github.com/sweir27","followers_url":"https://api.github.com/users/sweir27/followers","following_url":"https://api.github.com/users/sweir27/following{/other_user}","gists_url":"https://api.github.com/users/sweir27/gists{/gist_id}","starred_url":"https://api.github.com/users/sweir27/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sweir27/subscriptions","organizations_url":"https://api.github.com/users/sweir27/orgs","repos_url":"https://api.github.com/users/sweir27/repos","events_url":"https://api.github.com/users/sweir27/events{/privacy}","received_events_url":"https://api.github.com/users/sweir27/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":1025470965,"node_id":"MDU6TGFiZWwxMDI1NDcwOTY1","url":"https://api.github.com/repos/artsy/reaction/labels/Jira%20Synced","name":"Jira Synced","color":"0366d6","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/artsy/reaction/pulls/1677/commits","review_comments_url":"https://api.github.com/repos/artsy/reaction/pulls/1677/comments","review_comment_url":"https://api.github.com/repos/artsy/reaction/pulls/comments{/number}","comments_url":"https://api.github.com/repos/artsy/reaction/issues/1677/comments","statuses_url":"https://api.github.com/repos/artsy/reaction/statuses/e746929e5e75fdb63ad8befe3ab6ec2fc5a5b80c","head":{"label":"williardx:acceptMutation","ref":"acceptMutation","sha":"e746929e5e75fdb63ad8befe3ab6ec2fc5a5b80c","user":{"login":"williardx","id":4432348,"node_id":"MDQ6VXNlcjQ0MzIzNDg=","avatar_url":"https://avatars1.githubusercontent.com/u/4432348?v=4","gravatar_id":"","url":"https://api.github.com/users/williardx","html_url":"https://github.com/williardx","followers_url":"https://api.github.com/users/williardx/followers","following_url":"https://api.github.com/users/williardx/following{/other_user}","gists_url":"https://api.github.com/users/williardx/gists{/gist_id}","starred_url":"https://api.github.com/users/williardx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/williardx/subscriptions","organizations_url":"https://api.github.com/users/williardx/orgs","repos_url":"https://api.github.com/users/williardx/repos","events_url":"https://api.github.com/users/williardx/events{/privacy}","received_events_url":"https://api.github.com/users/williardx/received_events","type":"User","site_admin":false},"repo":{"id":152652214,"node_id":"MDEwOlJlcG9zaXRvcnkxNTI2NTIyMTQ=","name":"reaction","full_name":"williardx/reaction","private":false,"owner":{"login":"williardx","id":4432348,"node_id":"MDQ6VXNlcjQ0MzIzNDg=","avatar_url":"https://avatars1.githubusercontent.com/u/4432348?v=4","gravatar_id":"","url":"https://api.github.com/users/williardx","html_url":"https://github.com/williardx","followers_url":"https://api.github.com/users/williardx/followers","following_url":"https://api.github.com/users/williardx/following{/other_user}","gists_url":"https://api.github.com/users/williardx/gists{/gist_id}","starred_url":"https://api.github.com/users/williardx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/williardx/subscriptions","organizations_url":"https://api.github.com/users/williardx/orgs","repos_url":"https://api.github.com/users/williardx/repos","events_url":"https://api.github.com/users/williardx/events{/privacy}","received_events_url":"https://api.github.com/users/williardx/received_events","type":"User","site_admin":false},"html_url":"https://github.com/williardx/reaction","description":"Artsy’s React Components","fork":true,"url":"https://api.github.com/repos/williardx/reaction","forks_url":"https://api.github.com/repos/williardx/reaction/forks","keys_url":"https://api.github.com/repos/williardx/reaction/keys{/key_id}","collaborators_url":"https://api.github.com/repos/williardx/reaction/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/williardx/reaction/teams","hooks_url":"https://api.github.com/repos/williardx/reaction/hooks","issue_events_url":"https://api.github.com/repos/williardx/reaction/issues/events{/number}","events_url":"https://api.github.com/repos/williardx/reaction/events","assignees_url":"https://api.github.com/repos/williardx/reaction/assignees{/user}","branches_url":"https://api.github.com/repos/williardx/reaction/branches{/branch}","tags_url":"https://api.github.com/repos/williardx/reaction/tags","blobs_url":"https://api.github.com/repos/williardx/reaction/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/williardx/reaction/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/williardx/reaction/git/refs{/sha}","trees_url":"https://api.github.com/repos/williardx/reaction/git/trees{/sha}","statuses_url":"https://api.github.com/repos/williardx/reaction/statuses/{sha}","languages_url":"https://api.github.com/repos/williardx/reaction/languages","stargazers_url":"https://api.github.com/repos/williardx/reaction/stargazers","contributors_url":"https://api.github.com/repos/williardx/reaction/contributors","subscribers_url":"https://api.github.com/repos/williardx/reaction/subscribers","subscription_url":"https://api.github.com/repos/williardx/reaction/subscription","commits_url":"https://api.github.com/repos/williardx/reaction/commits{/sha}","git_commits_url":"https://api.github.com/repos/williardx/reaction/git/commits{/sha}","comments_url":"https://api.github.com/repos/williardx/reaction/comments{/number}","issue_comment_url":"https://api.github.com/repos/williardx/reaction/issues/comments{/number}","contents_url":"https://api.github.com/repos/williardx/reaction/contents/{+path}","compare_url":"https://api.github.com/repos/williardx/reaction/compare/{base}...{head}","merges_url":"https://api.github.com/repos/williardx/reaction/merges","archive_url":"https://api.github.com/repos/williardx/reaction/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/williardx/reaction/downloads","issues_url":"https://api.github.com/repos/williardx/reaction/issues{/number}","pulls_url":"https://api.github.com/repos/williardx/reaction/pulls{/number}","milestones_url":"https://api.github.com/repos/williardx/reaction/milestones{/number}","notifications_url":"https://api.github.com/repos/williardx/reaction/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/williardx/reaction/labels{/name}","releases_url":"https://api.github.com/repos/williardx/reaction/releases{/id}","deployments_url":"https://api.github.com/repos/williardx/reaction/deployments","created_at":"2018-10-11T20:32:50Z","updated_at":"2018-10-11T20:32:54Z","pushed_at":"2018-12-12T20:02:49Z","git_url":"git://github.com/williardx/reaction.git","ssh_url":"git@github.com:williardx/reaction.git","clone_url":"https://github.com/williardx/reaction.git","svn_url":"https://github.com/williardx/reaction","homepage":"https://artsy.github.io/reaction","size":27045,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"artsy:master","ref":"master","sha":"988ac9d4f5cc363db4e686f8bfa83235dbae4e81","user":{"login":"artsy","id":546231,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0NjIzMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/546231?v=4","gravatar_id":"","url":"https://api.github.com/users/artsy","html_url":"https://github.com/artsy","followers_url":"https://api.github.com/users/artsy/followers","following_url":"https://api.github.com/users/artsy/following{/other_user}","gists_url":"https://api.github.com/users/artsy/gists{/gist_id}","starred_url":"https://api.github.com/users/artsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artsy/subscriptions","organizations_url":"https://api.github.com/users/artsy/orgs","repos_url":"https://api.github.com/users/artsy/repos","events_url":"https://api.github.com/users/artsy/events{/privacy}","received_events_url":"https://api.github.com/users/artsy/received_events","type":"Organization","site_admin":false},"repo":{"id":81253735,"node_id":"MDEwOlJlcG9zaXRvcnk4MTI1MzczNQ==","name":"reaction","full_name":"artsy/reaction","private":false,"owner":{"login":"artsy","id":546231,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0NjIzMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/546231?v=4","gravatar_id":"","url":"https://api.github.com/users/artsy","html_url":"https://github.com/artsy","followers_url":"https://api.github.com/users/artsy/followers","following_url":"https://api.github.com/users/artsy/following{/other_user}","gists_url":"https://api.github.com/users/artsy/gists{/gist_id}","starred_url":"https://api.github.com/users/artsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artsy/subscriptions","organizations_url":"https://api.github.com/users/artsy/orgs","repos_url":"https://api.github.com/users/artsy/repos","events_url":"https://api.github.com/users/artsy/events{/privacy}","received_events_url":"https://api.github.com/users/artsy/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/artsy/reaction","description":"Artsy’s React Components","fork":false,"url":"https://api.github.com/repos/artsy/reaction","forks_url":"https://api.github.com/repos/artsy/reaction/forks","keys_url":"https://api.github.com/repos/artsy/reaction/keys{/key_id}","collaborators_url":"https://api.github.com/repos/artsy/reaction/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/artsy/reaction/teams","hooks_url":"https://api.github.com/repos/artsy/reaction/hooks","issue_events_url":"https://api.github.com/repos/artsy/reaction/issues/events{/number}","events_url":"https://api.github.com/repos/artsy/reaction/events","assignees_url":"https://api.github.com/repos/artsy/reaction/assignees{/user}","branches_url":"https://api.github.com/repos/artsy/reaction/branches{/branch}","tags_url":"https://api.github.com/repos/artsy/reaction/tags","blobs_url":"https://api.github.com/repos/artsy/reaction/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/artsy/reaction/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/artsy/reaction/git/refs{/sha}","trees_url":"https://api.github.com/repos/artsy/reaction/git/trees{/sha}","statuses_url":"https://api.github.com/repos/artsy/reaction/statuses/{sha}","languages_url":"https://api.github.com/repos/artsy/reaction/languages","stargazers_url":"https://api.github.com/repos/artsy/reaction/stargazers","contributors_url":"https://api.github.com/repos/artsy/reaction/contributors","subscribers_url":"https://api.github.com/repos/artsy/reaction/subscribers","subscription_url":"https://api.github.com/repos/artsy/reaction/subscription","commits_url":"https://api.github.com/repos/artsy/reaction/commits{/sha}","git_commits_url":"https://api.github.com/repos/artsy/reaction/git/commits{/sha}","comments_url":"https://api.github.com/repos/artsy/reaction/comments{/number}","issue_comment_url":"https://api.github.com/repos/artsy/reaction/issues/comments{/number}","contents_url":"https://api.github.com/repos/artsy/reaction/contents/{+path}","compare_url":"https://api.github.com/repos/artsy/reaction/compare/{base}...{head}","merges_url":"https://api.github.com/repos/artsy/reaction/merges","archive_url":"https://api.github.com/repos/artsy/reaction/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/artsy/reaction/downloads","issues_url":"https://api.github.com/repos/artsy/reaction/issues{/number}","pulls_url":"https://api.github.com/repos/artsy/reaction/pulls{/number}","milestones_url":"https://api.github.com/repos/artsy/reaction/milestones{/number}","notifications_url":"https://api.github.com/repos/artsy/reaction/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/artsy/reaction/labels{/name}","releases_url":"https://api.github.com/repos/artsy/reaction/releases{/id}","deployments_url":"https://api.github.com/repos/artsy/reaction/deployments","created_at":"2017-02-07T21:00:51Z","updated_at":"2018-12-12T20:36:29Z","pushed_at":"2018-12-12T20:36:25Z","git_url":"git://github.com/artsy/reaction.git","ssh_url":"git@github.com:artsy/reaction.git","clone_url":"https://github.com/artsy/reaction.git","svn_url":"https://github.com/artsy/reaction","homepage":"https://artsy.github.io/reaction","size":27195,"stargazers_count":212,"watchers_count":212,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":49,"mirror_url":null,"archived":false,"open_issues_count":37,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":49,"open_issues":37,"watchers":212,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/artsy/reaction/pulls/1677"},"html":{"href":"https://github.com/artsy/reaction/pull/1677"},"issue":{"href":"https://api.github.com/repos/artsy/reaction/issues/1677"},"comments":{"href":"https://api.github.com/repos/artsy/reaction/issues/1677/comments"},"review_comments":{"href":"https://api.github.com/repos/artsy/reaction/pulls/1677/comments"},"review_comment":{"href":"https://api.github.com/repos/artsy/reaction/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/artsy/reaction/pulls/1677/commits"},"statuses":{"href":"https://api.github.com/repos/artsy/reaction/statuses/e746929e5e75fdb63ad8befe3ab6ec2fc5a5b80c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"sweir27"}}