{"action":"created","comment":{"url":"https://api.github.com/repos/wix/stylable-components/pulls/comments/131828809","pull_request_review_id":54843090,"id":131828809,"diff_hunk":"@@ -0,0 +1,42 @@\n+import {ClientRenderer, expect, RenderingContext, simulate, sinon, waitFor} from 'test-drive-react';\n+import React = require('react');\n+import {findDOMNode} from 'react-dom';\n+\n+export function assertRootElementContract(Component: React.ComponentType<any>): void {\n+    describe('Root Element contract', function() {\n+        const clientRenderer = new ClientRenderer();\n+        function render<P>(element: React.ReactElement<P>): RenderingContext<P> & { node: Element } {\n+            const output = clientRenderer.render(element);\n+            return { node: findDOMNode(output.result as React.ReactInstance), ...output};\n+        }\n+\n+        afterEach(() => {\n+            clientRenderer.cleanup();\n+        });\n+\n+        it('assumes data-automation-id merge', function() {\n+             const {select} = render(<Component data-automation-id=\"CONTRACT_TEST\"/>);\n+             expect(select('CONTRACT_TEST'), 'data-automation-id not properly merged').to.not.equal(null);","path":"test/contracts/root-element.tsx","position":19,"original_position":19,"commit_id":"1bcb5af489fb39e8c89ec5e2a83581628287bf56","original_commit_id":"1bcb5af489fb39e8c89ec5e2a83581628287bf56","user":{"login":"amir-arad","id":6019373,"avatar_url":"https://avatars1.githubusercontent.com/u/6019373?v=4","gravatar_id":"","url":"https://api.github.com/users/amir-arad","html_url":"https://github.com/amir-arad","followers_url":"https://api.github.com/users/amir-arad/followers","following_url":"https://api.github.com/users/amir-arad/following{/other_user}","gists_url":"https://api.github.com/users/amir-arad/gists{/gist_id}","starred_url":"https://api.github.com/users/amir-arad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amir-arad/subscriptions","organizations_url":"https://api.github.com/users/amir-arad/orgs","repos_url":"https://api.github.com/users/amir-arad/repos","events_url":"https://api.github.com/users/amir-arad/events{/privacy}","received_events_url":"https://api.github.com/users/amir-arad/received_events","type":"User","site_admin":false},"body":"can you check that selection by DAID returns the root element?","created_at":"2017-08-08T06:16:31Z","updated_at":"2017-08-08T06:16:31Z","html_url":"https://github.com/wix/stylable-components/pull/144#discussion_r131828809","pull_request_url":"https://api.github.com/repos/wix/stylable-components/pulls/144","_links":{"self":{"href":"https://api.github.com/repos/wix/stylable-components/pulls/comments/131828809"},"html":{"href":"https://github.com/wix/stylable-components/pull/144#discussion_r131828809"},"pull_request":{"href":"https://api.github.com/repos/wix/stylable-components/pulls/144"}}},"pull_request":{"url":"https://api.github.com/repos/wix/stylable-components/pulls/144","id":134366694,"html_url":"https://github.com/wix/stylable-components/pull/144","diff_url":"https://github.com/wix/stylable-components/pull/144.diff","patch_url":"https://github.com/wix/stylable-components/pull/144.patch","issue_url":"https://api.github.com/repos/wix/stylable-components/issues/144","number":144,"state":"open","locked":false,"title":"Component Root Element Contract test","user":{"login":"tobich","id":1175842,"avatar_url":"https://avatars1.githubusercontent.com/u/1175842?v=4","gravatar_id":"","url":"https://api.github.com/users/tobich","html_url":"https://github.com/tobich","followers_url":"https://api.github.com/users/tobich/followers","following_url":"https://api.github.com/users/tobich/following{/other_user}","gists_url":"https://api.github.com/users/tobich/gists{/gist_id}","starred_url":"https://api.github.com/users/tobich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobich/subscriptions","organizations_url":"https://api.github.com/users/tobich/orgs","repos_url":"https://api.github.com/users/tobich/repos","events_url":"https://api.github.com/users/tobich/events{/privacy}","received_events_url":"https://api.github.com/users/tobich/received_events","type":"User","site_admin":false},"body":"Added generic assert (obligatory for every component) which tests whether all the behavior expected from the root element (i.e. merges of certain attributes) is present.\r\nCurrently, added only to the checkbox component.","created_at":"2017-08-07T05:52:07Z","updated_at":"2017-08-08T06:16:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1d264f6444ae5ffd9c8b1af6672d1331e5872283","assignee":null,"assignees":[],"requested_reviewers":[{"login":"idoros","id":574751,"avatar_url":"https://avatars1.githubusercontent.com/u/574751?v=4","gravatar_id":"","url":"https://api.github.com/users/idoros","html_url":"https://github.com/idoros","followers_url":"https://api.github.com/users/idoros/followers","following_url":"https://api.github.com/users/idoros/following{/other_user}","gists_url":"https://api.github.com/users/idoros/gists{/gist_id}","starred_url":"https://api.github.com/users/idoros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idoros/subscriptions","organizations_url":"https://api.github.com/users/idoros/orgs","repos_url":"https://api.github.com/users/idoros/repos","events_url":"https://api.github.com/users/idoros/events{/privacy}","received_events_url":"https://api.github.com/users/idoros/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/wix/stylable-components/pulls/144/commits","review_comments_url":"https://api.github.com/repos/wix/stylable-components/pulls/144/comments","review_comment_url":"https://api.github.com/repos/wix/stylable-components/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wix/stylable-components/issues/144/comments","statuses_url":"https://api.github.com/repos/wix/stylable-components/statuses/1bcb5af489fb39e8c89ec5e2a83581628287bf56","head":{"label":"wix:tobich/125/root-element-contract","ref":"tobich/125/root-element-contract","sha":"1bcb5af489fb39e8c89ec5e2a83581628287bf56","user":{"login":"wix","id":686511,"avatar_url":"https://avatars1.githubusercontent.com/u/686511?v=4","gravatar_id":"","url":"https://api.github.com/users/wix","html_url":"https://github.com/wix","followers_url":"https://api.github.com/users/wix/followers","following_url":"https://api.github.com/users/wix/following{/other_user}","gists_url":"https://api.github.com/users/wix/gists{/gist_id}","starred_url":"https://api.github.com/users/wix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wix/subscriptions","organizations_url":"https://api.github.com/users/wix/orgs","repos_url":"https://api.github.com/users/wix/repos","events_url":"https://api.github.com/users/wix/events{/privacy}","received_events_url":"https://api.github.com/users/wix/received_events","type":"Organization","site_admin":false},"repo":{"id":94888705,"name":"stylable-components","full_name":"wix/stylable-components","owner":{"login":"wix","id":686511,"avatar_url":"https://avatars1.githubusercontent.com/u/686511?v=4","gravatar_id":"","url":"https://api.github.com/users/wix","html_url":"https://github.com/wix","followers_url":"https://api.github.com/users/wix/followers","following_url":"https://api.github.com/users/wix/following{/other_user}","gists_url":"https://api.github.com/users/wix/gists{/gist_id}","starred_url":"https://api.github.com/users/wix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wix/subscriptions","organizations_url":"https://api.github.com/users/wix/orgs","repos_url":"https://api.github.com/users/wix/repos","events_url":"https://api.github.com/users/wix/events{/privacy}","received_events_url":"https://api.github.com/users/wix/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wix/stylable-components","description":"Fully-tested & strictly-typed component library based on React, using optional Wix styling.","fork":false,"url":"https://api.github.com/repos/wix/stylable-components","forks_url":"https://api.github.com/repos/wix/stylable-components/forks","keys_url":"https://api.github.com/repos/wix/stylable-components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wix/stylable-components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wix/stylable-components/teams","hooks_url":"https://api.github.com/repos/wix/stylable-components/hooks","issue_events_url":"https://api.github.com/repos/wix/stylable-components/issues/events{/number}","events_url":"https://api.github.com/repos/wix/stylable-components/events","assignees_url":"https://api.github.com/repos/wix/stylable-components/assignees{/user}","branches_url":"https://api.github.com/repos/wix/stylable-components/branches{/branch}","tags_url":"https://api.github.com/repos/wix/stylable-components/tags","blobs_url":"https://api.github.com/repos/wix/stylable-components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wix/stylable-components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wix/stylable-components/git/refs{/sha}","trees_url":"https://api.github.com/repos/wix/stylable-components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wix/stylable-components/statuses/{sha}","languages_url":"https://api.github.com/repos/wix/stylable-components/languages","stargazers_url":"https://api.github.com/repos/wix/stylable-components/stargazers","contributors_url":"https://api.github.com/repos/wix/stylable-components/contributors","subscribers_url":"https://api.github.com/repos/wix/stylable-components/subscribers","subscription_url":"https://api.github.com/repos/wix/stylable-components/subscription","commits_url":"https://api.github.com/repos/wix/stylable-components/commits{/sha}","git_commits_url":"https://api.github.com/repos/wix/stylable-components/git/commits{/sha}","comments_url":"https://api.github.com/repos/wix/stylable-components/comments{/number}","issue_comment_url":"https://api.github.com/repos/wix/stylable-components/issues/comments{/number}","contents_url":"https://api.github.com/repos/wix/stylable-components/contents/{+path}","compare_url":"https://api.github.com/repos/wix/stylable-components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wix/stylable-components/merges","archive_url":"https://api.github.com/repos/wix/stylable-components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wix/stylable-components/downloads","issues_url":"https://api.github.com/repos/wix/stylable-components/issues{/number}","pulls_url":"https://api.github.com/repos/wix/stylable-components/pulls{/number}","milestones_url":"https://api.github.com/repos/wix/stylable-components/milestones{/number}","notifications_url":"https://api.github.com/repos/wix/stylable-components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wix/stylable-components/labels{/name}","releases_url":"https://api.github.com/repos/wix/stylable-components/releases{/id}","deployments_url":"https://api.github.com/repos/wix/stylable-components/deployments","created_at":"2017-06-20T12:28:08Z","updated_at":"2017-08-06T13:40:02Z","pushed_at":"2017-08-07T18:00:21Z","git_url":"git://github.com/wix/stylable-components.git","ssh_url":"git@github.com:wix/stylable-components.git","clone_url":"https://github.com/wix/stylable-components.git","svn_url":"https://github.com/wix/stylable-components","homepage":"","size":2030,"stargazers_count":8,"watchers_count":8,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":69,"forks":0,"open_issues":69,"watchers":8,"default_branch":"master"}},"base":{"label":"wix:master","ref":"master","sha":"6949f3b4f83bbbd549d15904240a25e25f3c8227","user":{"login":"wix","id":686511,"avatar_url":"https://avatars1.githubusercontent.com/u/686511?v=4","gravatar_id":"","url":"https://api.github.com/users/wix","html_url":"https://github.com/wix","followers_url":"https://api.github.com/users/wix/followers","following_url":"https://api.github.com/users/wix/following{/other_user}","gists_url":"https://api.github.com/users/wix/gists{/gist_id}","starred_url":"https://api.github.com/users/wix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wix/subscriptions","organizations_url":"https://api.github.com/users/wix/orgs","repos_url":"https://api.github.com/users/wix/repos","events_url":"https://api.github.com/users/wix/events{/privacy}","received_events_url":"https://api.github.com/users/wix/received_events","type":"Organization","site_admin":false},"repo":{"id":94888705,"name":"stylable-components","full_name":"wix/stylable-components","owner":{"login":"wix","id":686511,"avatar_url":"https://avatars1.githubusercontent.com/u/686511?v=4","gravatar_id":"","url":"https://api.github.com/users/wix","html_url":"https://github.com/wix","followers_url":"https://api.github.com/users/wix/followers","following_url":"https://api.github.com/users/wix/following{/other_user}","gists_url":"https://api.github.com/users/wix/gists{/gist_id}","starred_url":"https://api.github.com/users/wix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wix/subscriptions","organizations_url":"https://api.github.com/users/wix/orgs","repos_url":"https://api.github.com/users/wix/repos","events_url":"https://api.github.com/users/wix/events{/privacy}","received_events_url":"https://api.github.com/users/wix/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wix/stylable-components","description":"Fully-tested & strictly-typed component library based on React, using optional Wix styling.","fork":false,"url":"https://api.github.com/repos/wix/stylable-components","forks_url":"https://api.github.com/repos/wix/stylable-components/forks","keys_url":"https://api.github.com/repos/wix/stylable-components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wix/stylable-components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wix/stylable-components/teams","hooks_url":"https://api.github.com/repos/wix/stylable-components/hooks","issue_events_url":"https://api.github.com/repos/wix/stylable-components/issues/events{/number}","events_url":"https://api.github.com/repos/wix/stylable-components/events","assignees_url":"https://api.github.com/repos/wix/stylable-components/assignees{/user}","branches_url":"https://api.github.com/repos/wix/stylable-components/branches{/branch}","tags_url":"https://api.github.com/repos/wix/stylable-components/tags","blobs_url":"https://api.github.com/repos/wix/stylable-components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wix/stylable-components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wix/stylable-components/git/refs{/sha}","trees_url":"https://api.github.com/repos/wix/stylable-components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wix/stylable-components/statuses/{sha}","languages_url":"https://api.github.com/repos/wix/stylable-components/languages","stargazers_url":"https://api.github.com/repos/wix/stylable-components/stargazers","contributors_url":"https://api.github.com/repos/wix/stylable-components/contributors","subscribers_url":"https://api.github.com/repos/wix/stylable-components/subscribers","subscription_url":"https://api.github.com/repos/wix/stylable-components/subscription","commits_url":"https://api.github.com/repos/wix/stylable-components/commits{/sha}","git_commits_url":"https://api.github.com/repos/wix/stylable-components/git/commits{/sha}","comments_url":"https://api.github.com/repos/wix/stylable-components/comments{/number}","issue_comment_url":"https://api.github.com/repos/wix/stylable-components/issues/comments{/number}","contents_url":"https://api.github.com/repos/wix/stylable-components/contents/{+path}","compare_url":"https://api.github.com/repos/wix/stylable-components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wix/stylable-components/merges","archive_url":"https://api.github.com/repos/wix/stylable-components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wix/stylable-components/downloads","issues_url":"https://api.github.com/repos/wix/stylable-components/issues{/number}","pulls_url":"https://api.github.com/repos/wix/stylable-components/pulls{/number}","milestones_url":"https://api.github.com/repos/wix/stylable-components/milestones{/number}","notifications_url":"https://api.github.com/repos/wix/stylable-components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wix/stylable-components/labels{/name}","releases_url":"https://api.github.com/repos/wix/stylable-components/releases{/id}","deployments_url":"https://api.github.com/repos/wix/stylable-components/deployments","created_at":"2017-06-20T12:28:08Z","updated_at":"2017-08-06T13:40:02Z","pushed_at":"2017-08-07T18:00:21Z","git_url":"git://github.com/wix/stylable-components.git","ssh_url":"git@github.com:wix/stylable-components.git","clone_url":"https://github.com/wix/stylable-components.git","svn_url":"https://github.com/wix/stylable-components","homepage":"","size":2030,"stargazers_count":8,"watchers_count":8,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":69,"forks":0,"open_issues":69,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wix/stylable-components/pulls/144"},"html":{"href":"https://github.com/wix/stylable-components/pull/144"},"issue":{"href":"https://api.github.com/repos/wix/stylable-components/issues/144"},"comments":{"href":"https://api.github.com/repos/wix/stylable-components/issues/144/comments"},"review_comments":{"href":"https://api.github.com/repos/wix/stylable-components/pulls/144/comments"},"review_comment":{"href":"https://api.github.com/repos/wix/stylable-components/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wix/stylable-components/pulls/144/commits"},"statuses":{"href":"https://api.github.com/repos/wix/stylable-components/statuses/1bcb5af489fb39e8c89ec5e2a83581628287bf56"}}}}
{"actor":{"display_login":"amir-arad"}}