{"action":"created","comment":{"url":"https://api.github.com/repos/CMSgov/design-system/pulls/comments/145583899","pull_request_review_id":70405118,"id":145583899,"diff_hunk":"@@ -109,17 +109,48 @@ describe('Tabs', function() {\n \n     it('calls onChange', () => {\n       const onChangeMock = jest.fn();\n-      const data = shallowRender(\n+      const data = render(\n         {\n           onChange: onChangeMock,\n           selectedId: 'panel-1'\n         },\n-        children\n+        children,\n+        true\n       );\n \n       data.wrapper.setState({ selectedId: 'panel-2' });\n \n       expect(onChangeMock.mock.calls.length).toBe(1);\n     });\n+\n+    it('selects the second panel on right arrow keyDown', () => {\n+      const data = render(\n+        { defaultSelectedId: 'panel-1' },\n+        children,\n+        true\n+      );\n+      const panels = data.wrapper.find('TabPanel');\n+      const tabs = data.wrapper.find('Tab');\n+\n+      tabs.first().simulate('keyDown', { key: 'ArrowRight' });\n+\n+      expect(panels.at(1).prop('selected')).toBe(true);\n+      expect(tabs.at(1).prop('selected')).toBe(true);\n+    });","path":"packages/core/src/components/Tabs/Tabs.test.jsx","position":105,"original_position":105,"commit_id":"060bf23b8e383f756270f4e13d368a11641c1a2b","original_commit_id":"060bf23b8e383f756270f4e13d368a11641c1a2b","user":{"login":"sawyerh","id":371943,"avatar_url":"https://avatars2.githubusercontent.com/u/371943?v=4","gravatar_id":"","url":"https://api.github.com/users/sawyerh","html_url":"https://github.com/sawyerh","followers_url":"https://api.github.com/users/sawyerh/followers","following_url":"https://api.github.com/users/sawyerh/following{/other_user}","gists_url":"https://api.github.com/users/sawyerh/gists{/gist_id}","starred_url":"https://api.github.com/users/sawyerh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sawyerh/subscriptions","organizations_url":"https://api.github.com/users/sawyerh/orgs","repos_url":"https://api.github.com/users/sawyerh/repos","events_url":"https://api.github.com/users/sawyerh/events{/privacy}","received_events_url":"https://api.github.com/users/sawyerh/received_events","type":"User","site_admin":false},"body":"@1Copenut I think I finally figured out why these new tests are failing. Looks like it's related to this: http://airbnb.io/enzyme/docs/guides/migration-from-2-to-3.html#for-mount-updates-are-sometimes-required-when-they-werent-before\r\n\r\nTLDR: \r\n\r\n1. On line 132, we get the `panels` in their initial state (Panel 1 is selected)\r\n2. On line 135, we change the state in the component. `panels` doesn't auto-update though, so it still thinks Panel 1 is selected, when in reality Panel 2 is now selected.\r\n\r\nThe solution appears to be doing the `data.wrapper.find...` again after the state is changed so that we get the components in their updated state.\r\n","created_at":"2017-10-19T01:44:39Z","updated_at":"2017-10-19T01:44:40Z","html_url":"https://github.com/CMSgov/design-system/pull/161#discussion_r145583899","pull_request_url":"https://api.github.com/repos/CMSgov/design-system/pulls/161","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/CMSgov/design-system/pulls/comments/145583899"},"html":{"href":"https://github.com/CMSgov/design-system/pull/161#discussion_r145583899"},"pull_request":{"href":"https://api.github.com/repos/CMSgov/design-system/pulls/161"}}},"pull_request":{"url":"https://api.github.com/repos/CMSgov/design-system/pulls/161","id":145200356,"html_url":"https://github.com/CMSgov/design-system/pull/161","diff_url":"https://github.com/CMSgov/design-system/pull/161.diff","patch_url":"https://github.com/CMSgov/design-system/pull/161.patch","issue_url":"https://api.github.com/repos/CMSgov/design-system/issues/161","number":161,"state":"open","locked":false,"title":"Feature/a11y tabs","user":{"login":"1Copenut","id":934879,"avatar_url":"https://avatars0.githubusercontent.com/u/934879?v=4","gravatar_id":"","url":"https://api.github.com/users/1Copenut","html_url":"https://github.com/1Copenut","followers_url":"https://api.github.com/users/1Copenut/followers","following_url":"https://api.github.com/users/1Copenut/following{/other_user}","gists_url":"https://api.github.com/users/1Copenut/gists{/gist_id}","starred_url":"https://api.github.com/users/1Copenut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1Copenut/subscriptions","organizations_url":"https://api.github.com/users/1Copenut/orgs","repos_url":"https://api.github.com/users/1Copenut/repos","events_url":"https://api.github.com/users/1Copenut/events{/privacy}","received_events_url":"https://api.github.com/users/1Copenut/received_events","type":"User","site_admin":false},"body":"### Added\r\nAdded the ability for Tabs component to change tab focus by pressing left and right arrows. This is in line with the latest [WAI-ARIA Authoring Practices 1.1 for Tabs.](https://www.w3.org/TR/wai-aria-practices-1.1/#tabpanel)\r\n\r\n### Changed\r\n* Updated Tabs.jsx to include a keydown method that listens for left and right arrow presses, without interfering with Tab or Enter keypresses\r\n* Updated Tabs.jsx to include a ref prop for handling focus\r\n* Updated Tab.jsx to include a ref prop for handling focus\r\n* Updated Tabs.test.jsx to include a deepMount function that passes custom props and renders a full component using Enzyme's mount method\r\n* Updated the Webpack.config.js file to add CoreJS method for Array.prototype.findIndex\r\n* Updated the Webpack.config.js file to add CoreJS method for Object.getOwnPropertyNames\r\n\r\n### Tested for a11y\r\n* Verified proper keyboard handling in following browsers:\r\n** Windows 10 - IE11, Edge, Chrome, Firefox\r\n** OSX - Safari, Chrome, Firefox\r\n* Verified tab usability in following screenreader combinations:\r\n** Windows 10 - IE11 - JAWS\r\n** Windows 10 - Firefox - NVDA\r\n** OSX - Safari - VoiceOver","created_at":"2017-10-06T16:57:17Z","updated_at":"2017-10-19T01:44:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"05e32895bd4d7a63df4f601e54abfb480730b5a4","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/CMSgov/design-system/pulls/161/commits","review_comments_url":"https://api.github.com/repos/CMSgov/design-system/pulls/161/comments","review_comment_url":"https://api.github.com/repos/CMSgov/design-system/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CMSgov/design-system/issues/161/comments","statuses_url":"https://api.github.com/repos/CMSgov/design-system/statuses/060bf23b8e383f756270f4e13d368a11641c1a2b","head":{"label":"CMSgov:feature/a11y-tabs","ref":"feature/a11y-tabs","sha":"060bf23b8e383f756270f4e13d368a11641c1a2b","user":{"login":"CMSgov","id":3209407,"avatar_url":"https://avatars3.githubusercontent.com/u/3209407?v=4","gravatar_id":"","url":"https://api.github.com/users/CMSgov","html_url":"https://github.com/CMSgov","followers_url":"https://api.github.com/users/CMSgov/followers","following_url":"https://api.github.com/users/CMSgov/following{/other_user}","gists_url":"https://api.github.com/users/CMSgov/gists{/gist_id}","starred_url":"https://api.github.com/users/CMSgov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CMSgov/subscriptions","organizations_url":"https://api.github.com/users/CMSgov/orgs","repos_url":"https://api.github.com/users/CMSgov/repos","events_url":"https://api.github.com/users/CMSgov/events{/privacy}","received_events_url":"https://api.github.com/users/CMSgov/received_events","type":"Organization","site_admin":false},"repo":{"id":81160818,"name":"design-system","full_name":"CMSgov/design-system","owner":{"login":"CMSgov","id":3209407,"avatar_url":"https://avatars3.githubusercontent.com/u/3209407?v=4","gravatar_id":"","url":"https://api.github.com/users/CMSgov","html_url":"https://github.com/CMSgov","followers_url":"https://api.github.com/users/CMSgov/followers","following_url":"https://api.github.com/users/CMSgov/following{/other_user}","gists_url":"https://api.github.com/users/CMSgov/gists{/gist_id}","starred_url":"https://api.github.com/users/CMSgov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CMSgov/subscriptions","organizations_url":"https://api.github.com/users/CMSgov/orgs","repos_url":"https://api.github.com/users/CMSgov/repos","events_url":"https://api.github.com/users/CMSgov/events{/privacy}","received_events_url":"https://api.github.com/users/CMSgov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CMSgov/design-system","description":null,"fork":false,"url":"https://api.github.com/repos/CMSgov/design-system","forks_url":"https://api.github.com/repos/CMSgov/design-system/forks","keys_url":"https://api.github.com/repos/CMSgov/design-system/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CMSgov/design-system/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CMSgov/design-system/teams","hooks_url":"https://api.github.com/repos/CMSgov/design-system/hooks","issue_events_url":"https://api.github.com/repos/CMSgov/design-system/issues/events{/number}","events_url":"https://api.github.com/repos/CMSgov/design-system/events","assignees_url":"https://api.github.com/repos/CMSgov/design-system/assignees{/user}","branches_url":"https://api.github.com/repos/CMSgov/design-system/branches{/branch}","tags_url":"https://api.github.com/repos/CMSgov/design-system/tags","blobs_url":"https://api.github.com/repos/CMSgov/design-system/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CMSgov/design-system/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CMSgov/design-system/git/refs{/sha}","trees_url":"https://api.github.com/repos/CMSgov/design-system/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CMSgov/design-system/statuses/{sha}","languages_url":"https://api.github.com/repos/CMSgov/design-system/languages","stargazers_url":"https://api.github.com/repos/CMSgov/design-system/stargazers","contributors_url":"https://api.github.com/repos/CMSgov/design-system/contributors","subscribers_url":"https://api.github.com/repos/CMSgov/design-system/subscribers","subscription_url":"https://api.github.com/repos/CMSgov/design-system/subscription","commits_url":"https://api.github.com/repos/CMSgov/design-system/commits{/sha}","git_commits_url":"https://api.github.com/repos/CMSgov/design-system/git/commits{/sha}","comments_url":"https://api.github.com/repos/CMSgov/design-system/comments{/number}","issue_comment_url":"https://api.github.com/repos/CMSgov/design-system/issues/comments{/number}","contents_url":"https://api.github.com/repos/CMSgov/design-system/contents/{+path}","compare_url":"https://api.github.com/repos/CMSgov/design-system/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CMSgov/design-system/merges","archive_url":"https://api.github.com/repos/CMSgov/design-system/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CMSgov/design-system/downloads","issues_url":"https://api.github.com/repos/CMSgov/design-system/issues{/number}","pulls_url":"https://api.github.com/repos/CMSgov/design-system/pulls{/number}","milestones_url":"https://api.github.com/repos/CMSgov/design-system/milestones{/number}","notifications_url":"https://api.github.com/repos/CMSgov/design-system/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CMSgov/design-system/labels{/name}","releases_url":"https://api.github.com/repos/CMSgov/design-system/releases{/id}","deployments_url":"https://api.github.com/repos/CMSgov/design-system/deployments","created_at":"2017-02-07T03:13:01Z","updated_at":"2017-10-18T13:56:13Z","pushed_at":"2017-10-19T01:38:21Z","git_url":"git://github.com/CMSgov/design-system.git","ssh_url":"git@github.com:CMSgov/design-system.git","clone_url":"https://github.com/CMSgov/design-system.git","svn_url":"https://github.com/CMSgov/design-system","homepage":"https://design.cms.gov","size":10753,"stargazers_count":64,"watchers_count":64,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":5,"forks":6,"open_issues":5,"watchers":64,"default_branch":"master"}},"base":{"label":"CMSgov:staging","ref":"staging","sha":"e5ac220f085e50a0181cecd6cd0cc9af6216a61d","user":{"login":"CMSgov","id":3209407,"avatar_url":"https://avatars3.githubusercontent.com/u/3209407?v=4","gravatar_id":"","url":"https://api.github.com/users/CMSgov","html_url":"https://github.com/CMSgov","followers_url":"https://api.github.com/users/CMSgov/followers","following_url":"https://api.github.com/users/CMSgov/following{/other_user}","gists_url":"https://api.github.com/users/CMSgov/gists{/gist_id}","starred_url":"https://api.github.com/users/CMSgov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CMSgov/subscriptions","organizations_url":"https://api.github.com/users/CMSgov/orgs","repos_url":"https://api.github.com/users/CMSgov/repos","events_url":"https://api.github.com/users/CMSgov/events{/privacy}","received_events_url":"https://api.github.com/users/CMSgov/received_events","type":"Organization","site_admin":false},"repo":{"id":81160818,"name":"design-system","full_name":"CMSgov/design-system","owner":{"login":"CMSgov","id":3209407,"avatar_url":"https://avatars3.githubusercontent.com/u/3209407?v=4","gravatar_id":"","url":"https://api.github.com/users/CMSgov","html_url":"https://github.com/CMSgov","followers_url":"https://api.github.com/users/CMSgov/followers","following_url":"https://api.github.com/users/CMSgov/following{/other_user}","gists_url":"https://api.github.com/users/CMSgov/gists{/gist_id}","starred_url":"https://api.github.com/users/CMSgov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CMSgov/subscriptions","organizations_url":"https://api.github.com/users/CMSgov/orgs","repos_url":"https://api.github.com/users/CMSgov/repos","events_url":"https://api.github.com/users/CMSgov/events{/privacy}","received_events_url":"https://api.github.com/users/CMSgov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CMSgov/design-system","description":null,"fork":false,"url":"https://api.github.com/repos/CMSgov/design-system","forks_url":"https://api.github.com/repos/CMSgov/design-system/forks","keys_url":"https://api.github.com/repos/CMSgov/design-system/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CMSgov/design-system/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CMSgov/design-system/teams","hooks_url":"https://api.github.com/repos/CMSgov/design-system/hooks","issue_events_url":"https://api.github.com/repos/CMSgov/design-system/issues/events{/number}","events_url":"https://api.github.com/repos/CMSgov/design-system/events","assignees_url":"https://api.github.com/repos/CMSgov/design-system/assignees{/user}","branches_url":"https://api.github.com/repos/CMSgov/design-system/branches{/branch}","tags_url":"https://api.github.com/repos/CMSgov/design-system/tags","blobs_url":"https://api.github.com/repos/CMSgov/design-system/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CMSgov/design-system/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CMSgov/design-system/git/refs{/sha}","trees_url":"https://api.github.com/repos/CMSgov/design-system/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CMSgov/design-system/statuses/{sha}","languages_url":"https://api.github.com/repos/CMSgov/design-system/languages","stargazers_url":"https://api.github.com/repos/CMSgov/design-system/stargazers","contributors_url":"https://api.github.com/repos/CMSgov/design-system/contributors","subscribers_url":"https://api.github.com/repos/CMSgov/design-system/subscribers","subscription_url":"https://api.github.com/repos/CMSgov/design-system/subscription","commits_url":"https://api.github.com/repos/CMSgov/design-system/commits{/sha}","git_commits_url":"https://api.github.com/repos/CMSgov/design-system/git/commits{/sha}","comments_url":"https://api.github.com/repos/CMSgov/design-system/comments{/number}","issue_comment_url":"https://api.github.com/repos/CMSgov/design-system/issues/comments{/number}","contents_url":"https://api.github.com/repos/CMSgov/design-system/contents/{+path}","compare_url":"https://api.github.com/repos/CMSgov/design-system/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CMSgov/design-system/merges","archive_url":"https://api.github.com/repos/CMSgov/design-system/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CMSgov/design-system/downloads","issues_url":"https://api.github.com/repos/CMSgov/design-system/issues{/number}","pulls_url":"https://api.github.com/repos/CMSgov/design-system/pulls{/number}","milestones_url":"https://api.github.com/repos/CMSgov/design-system/milestones{/number}","notifications_url":"https://api.github.com/repos/CMSgov/design-system/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CMSgov/design-system/labels{/name}","releases_url":"https://api.github.com/repos/CMSgov/design-system/releases{/id}","deployments_url":"https://api.github.com/repos/CMSgov/design-system/deployments","created_at":"2017-02-07T03:13:01Z","updated_at":"2017-10-18T13:56:13Z","pushed_at":"2017-10-19T01:38:21Z","git_url":"git://github.com/CMSgov/design-system.git","ssh_url":"git@github.com:CMSgov/design-system.git","clone_url":"https://github.com/CMSgov/design-system.git","svn_url":"https://github.com/CMSgov/design-system","homepage":"https://design.cms.gov","size":10753,"stargazers_count":64,"watchers_count":64,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":5,"forks":6,"open_issues":5,"watchers":64,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CMSgov/design-system/pulls/161"},"html":{"href":"https://github.com/CMSgov/design-system/pull/161"},"issue":{"href":"https://api.github.com/repos/CMSgov/design-system/issues/161"},"comments":{"href":"https://api.github.com/repos/CMSgov/design-system/issues/161/comments"},"review_comments":{"href":"https://api.github.com/repos/CMSgov/design-system/pulls/161/comments"},"review_comment":{"href":"https://api.github.com/repos/CMSgov/design-system/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CMSgov/design-system/pulls/161/commits"},"statuses":{"href":"https://api.github.com/repos/CMSgov/design-system/statuses/060bf23b8e383f756270f4e13d368a11641c1a2b"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"sawyerh"}}