{"action":"created","comment":{"url":"https://api.github.com/repos/preview-code/rite-evaluation/pulls/comments/64907241","id":64907241,"diff_hunk":"@@ -0,0 +1,126 @@\n+<!doctype html>\n+<html>\n+<head>\n+  <meta name='viewport' content='width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes'>\n+  <title>pull-request-group-tests</title>\n+\n+  <script src='../../../src/bower_components/webcomponentsjs/webcomponents-lite.min.js'></script>\n+  <script src='../../../src/bower_components/web-component-tester/browser.js'></script>\n+\n+  <!-- Import the element to test -->\n+  <link rel='import' href='../../../src/projects/diff/group.html'>\n+\n+</head>\n+<body>\n+\n+  <test-fixture id='basic'>\n+    <template>\n+      <pull-request-group></pull-request-group>\n+    </template>\n+  </test-fixture>\n+\n+  <script>\n+  suite('<pull-request-group> unit', function() {\n+    var groupElem;\n+\n+    setup(function() {\n+      /*\n+       * Stubbing multiple elements currently does not work in wct.\n+       * A PR with a fix is ready on the wct repo, but it's not merged yet.\n+       * https://github.com/Polymer/web-component-tester/pull/310\n+       */\n+      // stub('markdown-input');\n+      // stub('pull-request-comment');\n+      // stub('pull-request-add-comments');\n+      // stub('pull-request-diff-highlight');\n+      // stub('collapse-icon');\n+      groupElem = fixture('basic');\n+    });\n+\n+    test('disables sorting when group is not editable', function() {\n+      groupElem.editable = false;\n+      var sortable = getSortable();\n+      assert.isTrue(sortable.disabled);\n+    });\n+\n+    test('hides comments when group is editable', function() {\n+      groupElem.editable = true;\n+      var display = getComputedStyle(get('.toggle-comments')).display;\n+      assert.equal(display, 'none');\n+    });\n+\n+    test('hides comments by default', function() {\n+      var display = getComputedStyle(get('.group-comment')).display;\n+      assert.equal(display, 'none');\n+    });\n+\n+    test('hides comments when group is editable', function() {\n+      groupElem.editable = true;\n+      var groupComment = getComputedStyle(get('.group-comment'));\n+      assert.equal(groupComment.display, 'none');\n+    });\n+\n+    test('shows comments when collapseComments is false', function() {\n+      groupElem.collapseComments = false;\n+      var display = getComputedStyle(get('.group-comment')).display;\n+      assert.notEqual(display, 'none');\n+    });\n+\n+    test('hides diffs when collapsed', function() {\n+      groupElem.collapsed = true;\n+      var display = getComputedStyle(get('.content')).display;\n+      assert.equal(display, 'none');\n+    });\n+\n+    test('hides description when no descripion was provided', function() {\n+      var display = getComputedStyle(get('markdown-input')).display;\n+      assert.equal(display, 'none');\n+    });\n+\n+    test('shows default title when no title was provided', function() {\n+      var title = get('h2');\n+      assert.equal(title.innerHTML, 'Unsorted changes');\n+    });\n+\n+    test('shows title when collapsed', function() {\n+      groupElem.title = \"someTitle\";\n+      groupElem.collapsed = true;\n+      var title = get('h2');\n+      assert.equal(title.innerHTML, 'someTitle');\n+    });\n+\n+    test('fires `empty` event when all diffs are removed', function(done) {\n+      groupElem.group = { diff: [], comments: [] };\n+\n+      addEventListener(groupElem, 'empty', function() {\n+        done();","path":"test/projects/diff/group.html","position":96,"original_position":96,"commit_id":"7caa7a91f1011124fa374631606df80d9fe2c9d2","original_commit_id":"7caa7a91f1011124fa374631606df80d9fe2c9d2","user":{"login":"TimvdLippe","id":5948271,"avatar_url":"https://avatars.githubusercontent.com/u/5948271?v=3","gravatar_id":"","url":"https://api.github.com/users/TimvdLippe","html_url":"https://github.com/TimvdLippe","followers_url":"https://api.github.com/users/TimvdLippe/followers","following_url":"https://api.github.com/users/TimvdLippe/following{/other_user}","gists_url":"https://api.github.com/users/TimvdLippe/gists{/gist_id}","starred_url":"https://api.github.com/users/TimvdLippe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TimvdLippe/subscriptions","organizations_url":"https://api.github.com/users/TimvdLippe/orgs","repos_url":"https://api.github.com/users/TimvdLippe/repos","events_url":"https://api.github.com/users/TimvdLippe/events{/privacy}","received_events_url":"https://api.github.com/users/TimvdLippe/received_events","type":"User","site_admin":false},"body":"`function() { done() }` can be minimized to `done`.","created_at":"2016-05-27T13:52:16Z","updated_at":"2016-05-27T13:52:16Z","html_url":"https://github.com/preview-code/rite-evaluation/pull/154#discussion_r64907241","pull_request_url":"https://api.github.com/repos/preview-code/rite-evaluation/pulls/154","_links":{"self":{"href":"https://api.github.com/repos/preview-code/rite-evaluation/pulls/comments/64907241"},"html":{"href":"https://github.com/preview-code/rite-evaluation/pull/154#discussion_r64907241"},"pull_request":{"href":"https://api.github.com/repos/preview-code/rite-evaluation/pulls/154"}}},"pull_request":{"url":"https://api.github.com/repos/preview-code/rite-evaluation/pulls/154","id":71715521,"html_url":"https://github.com/preview-code/rite-evaluation/pull/154","diff_url":"https://github.com/preview-code/rite-evaluation/pull/154.diff","patch_url":"https://github.com/preview-code/rite-evaluation/pull/154.patch","issue_url":"https://api.github.com/repos/preview-code/rite-evaluation/issues/154","number":154,"state":"open","locked":false,"title":"Add tests for diff-group","user":{"login":"txsmith","id":5946422,"avatar_url":"https://avatars.githubusercontent.com/u/5946422?v=3","gravatar_id":"","url":"https://api.github.com/users/txsmith","html_url":"https://github.com/txsmith","followers_url":"https://api.github.com/users/txsmith/followers","following_url":"https://api.github.com/users/txsmith/following{/other_user}","gists_url":"https://api.github.com/users/txsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/txsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/txsmith/subscriptions","organizations_url":"https://api.github.com/users/txsmith/orgs","repos_url":"https://api.github.com/users/txsmith/repos","events_url":"https://api.github.com/users/txsmith/events{/privacy}","received_events_url":"https://api.github.com/users/txsmith/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-05-27T13:47:43Z","updated_at":"2016-05-27T13:52:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"afee873b289121adbea958dd9d3f6236675d1d83","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/preview-code/rite-evaluation/pulls/154/commits","review_comments_url":"https://api.github.com/repos/preview-code/rite-evaluation/pulls/154/comments","review_comment_url":"https://api.github.com/repos/preview-code/rite-evaluation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/preview-code/rite-evaluation/issues/154/comments","statuses_url":"https://api.github.com/repos/preview-code/rite-evaluation/statuses/7caa7a91f1011124fa374631606df80d9fe2c9d2","head":{"label":"preview-code:test-diff-group","ref":"test-diff-group","sha":"7caa7a91f1011124fa374631606df80d9fe2c9d2","user":{"login":"preview-code","id":18683066,"avatar_url":"https://avatars.githubusercontent.com/u/18683066?v=3","gravatar_id":"","url":"https://api.github.com/users/preview-code","html_url":"https://github.com/preview-code","followers_url":"https://api.github.com/users/preview-code/followers","following_url":"https://api.github.com/users/preview-code/following{/other_user}","gists_url":"https://api.github.com/users/preview-code/gists{/gist_id}","starred_url":"https://api.github.com/users/preview-code/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/preview-code/subscriptions","organizations_url":"https://api.github.com/users/preview-code/orgs","repos_url":"https://api.github.com/users/preview-code/repos","events_url":"https://api.github.com/users/preview-code/events{/privacy}","received_events_url":"https://api.github.com/users/preview-code/received_events","type":"Organization","site_admin":false},"repo":{"id":57367345,"name":"rite-evaluation","full_name":"preview-code/rite-evaluation","owner":{"login":"preview-code","id":18683066,"avatar_url":"https://avatars.githubusercontent.com/u/18683066?v=3","gravatar_id":"","url":"https://api.github.com/users/preview-code","html_url":"https://github.com/preview-code","followers_url":"https://api.github.com/users/preview-code/followers","following_url":"https://api.github.com/users/preview-code/following{/other_user}","gists_url":"https://api.github.com/users/preview-code/gists{/gist_id}","starred_url":"https://api.github.com/users/preview-code/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/preview-code/subscriptions","organizations_url":"https://api.github.com/users/preview-code/orgs","repos_url":"https://api.github.com/users/preview-code/repos","events_url":"https://api.github.com/users/preview-code/events{/privacy}","received_events_url":"https://api.github.com/users/preview-code/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/preview-code/rite-evaluation","description":"","fork":false,"url":"https://api.github.com/repos/preview-code/rite-evaluation","forks_url":"https://api.github.com/repos/preview-code/rite-evaluation/forks","keys_url":"https://api.github.com/repos/preview-code/rite-evaluation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/preview-code/rite-evaluation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/preview-code/rite-evaluation/teams","hooks_url":"https://api.github.com/repos/preview-code/rite-evaluation/hooks","issue_events_url":"https://api.github.com/repos/preview-code/rite-evaluation/issues/events{/number}","events_url":"https://api.github.com/repos/preview-code/rite-evaluation/events","assignees_url":"https://api.github.com/repos/preview-code/rite-evaluation/assignees{/user}","branches_url":"https://api.github.com/repos/preview-code/rite-evaluation/branches{/branch}","tags_url":"https://api.github.com/repos/preview-code/rite-evaluation/tags","blobs_url":"https://api.github.com/repos/preview-code/rite-evaluation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/preview-code/rite-evaluation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/preview-code/rite-evaluation/git/refs{/sha}","trees_url":"https://api.github.com/repos/preview-code/rite-evaluation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/preview-code/rite-evaluation/statuses/{sha}","languages_url":"https://api.github.com/repos/preview-code/rite-evaluation/languages","stargazers_url":"https://api.github.com/repos/preview-code/rite-evaluation/stargazers","contributors_url":"https://api.github.com/repos/preview-code/rite-evaluation/contributors","subscribers_url":"https://api.github.com/repos/preview-code/rite-evaluation/subscribers","subscription_url":"https://api.github.com/repos/preview-code/rite-evaluation/subscription","commits_url":"https://api.github.com/repos/preview-code/rite-evaluation/commits{/sha}","git_commits_url":"https://api.github.com/repos/preview-code/rite-evaluation/git/commits{/sha}","comments_url":"https://api.github.com/repos/preview-code/rite-evaluation/comments{/number}","issue_comment_url":"https://api.github.com/repos/preview-code/rite-evaluation/issues/comments{/number}","contents_url":"https://api.github.com/repos/preview-code/rite-evaluation/contents/{+path}","compare_url":"https://api.github.com/repos/preview-code/rite-evaluation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/preview-code/rite-evaluation/merges","archive_url":"https://api.github.com/repos/preview-code/rite-evaluation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/preview-code/rite-evaluation/downloads","issues_url":"https://api.github.com/repos/preview-code/rite-evaluation/issues{/number}","pulls_url":"https://api.github.com/repos/preview-code/rite-evaluation/pulls{/number}","milestones_url":"https://api.github.com/repos/preview-code/rite-evaluation/milestones{/number}","notifications_url":"https://api.github.com/repos/preview-code/rite-evaluation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/preview-code/rite-evaluation/labels{/name}","releases_url":"https://api.github.com/repos/preview-code/rite-evaluation/releases{/id}","deployments_url":"https://api.github.com/repos/preview-code/rite-evaluation/deployments","created_at":"2016-04-29T08:09:35Z","updated_at":"2016-04-29T08:42:15Z","pushed_at":"2016-05-27T13:47:43Z","git_url":"git://github.com/preview-code/rite-evaluation.git","ssh_url":"git@github.com:preview-code/rite-evaluation.git","clone_url":"https://github.com/preview-code/rite-evaluation.git","svn_url":"https://github.com/preview-code/rite-evaluation","homepage":null,"size":342,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":43,"forks":1,"open_issues":43,"watchers":0,"default_branch":"master"}},"base":{"label":"preview-code:master","ref":"master","sha":"b381ba5b86cd6254b42f1c05fdc0c05e0cb0e80c","user":{"login":"preview-code","id":18683066,"avatar_url":"https://avatars.githubusercontent.com/u/18683066?v=3","gravatar_id":"","url":"https://api.github.com/users/preview-code","html_url":"https://github.com/preview-code","followers_url":"https://api.github.com/users/preview-code/followers","following_url":"https://api.github.com/users/preview-code/following{/other_user}","gists_url":"https://api.github.com/users/preview-code/gists{/gist_id}","starred_url":"https://api.github.com/users/preview-code/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/preview-code/subscriptions","organizations_url":"https://api.github.com/users/preview-code/orgs","repos_url":"https://api.github.com/users/preview-code/repos","events_url":"https://api.github.com/users/preview-code/events{/privacy}","received_events_url":"https://api.github.com/users/preview-code/received_events","type":"Organization","site_admin":false},"repo":{"id":57367345,"name":"rite-evaluation","full_name":"preview-code/rite-evaluation","owner":{"login":"preview-code","id":18683066,"avatar_url":"https://avatars.githubusercontent.com/u/18683066?v=3","gravatar_id":"","url":"https://api.github.com/users/preview-code","html_url":"https://github.com/preview-code","followers_url":"https://api.github.com/users/preview-code/followers","following_url":"https://api.github.com/users/preview-code/following{/other_user}","gists_url":"https://api.github.com/users/preview-code/gists{/gist_id}","starred_url":"https://api.github.com/users/preview-code/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/preview-code/subscriptions","organizations_url":"https://api.github.com/users/preview-code/orgs","repos_url":"https://api.github.com/users/preview-code/repos","events_url":"https://api.github.com/users/preview-code/events{/privacy}","received_events_url":"https://api.github.com/users/preview-code/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/preview-code/rite-evaluation","description":"","fork":false,"url":"https://api.github.com/repos/preview-code/rite-evaluation","forks_url":"https://api.github.com/repos/preview-code/rite-evaluation/forks","keys_url":"https://api.github.com/repos/preview-code/rite-evaluation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/preview-code/rite-evaluation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/preview-code/rite-evaluation/teams","hooks_url":"https://api.github.com/repos/preview-code/rite-evaluation/hooks","issue_events_url":"https://api.github.com/repos/preview-code/rite-evaluation/issues/events{/number}","events_url":"https://api.github.com/repos/preview-code/rite-evaluation/events","assignees_url":"https://api.github.com/repos/preview-code/rite-evaluation/assignees{/user}","branches_url":"https://api.github.com/repos/preview-code/rite-evaluation/branches{/branch}","tags_url":"https://api.github.com/repos/preview-code/rite-evaluation/tags","blobs_url":"https://api.github.com/repos/preview-code/rite-evaluation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/preview-code/rite-evaluation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/preview-code/rite-evaluation/git/refs{/sha}","trees_url":"https://api.github.com/repos/preview-code/rite-evaluation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/preview-code/rite-evaluation/statuses/{sha}","languages_url":"https://api.github.com/repos/preview-code/rite-evaluation/languages","stargazers_url":"https://api.github.com/repos/preview-code/rite-evaluation/stargazers","contributors_url":"https://api.github.com/repos/preview-code/rite-evaluation/contributors","subscribers_url":"https://api.github.com/repos/preview-code/rite-evaluation/subscribers","subscription_url":"https://api.github.com/repos/preview-code/rite-evaluation/subscription","commits_url":"https://api.github.com/repos/preview-code/rite-evaluation/commits{/sha}","git_commits_url":"https://api.github.com/repos/preview-code/rite-evaluation/git/commits{/sha}","comments_url":"https://api.github.com/repos/preview-code/rite-evaluation/comments{/number}","issue_comment_url":"https://api.github.com/repos/preview-code/rite-evaluation/issues/comments{/number}","contents_url":"https://api.github.com/repos/preview-code/rite-evaluation/contents/{+path}","compare_url":"https://api.github.com/repos/preview-code/rite-evaluation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/preview-code/rite-evaluation/merges","archive_url":"https://api.github.com/repos/preview-code/rite-evaluation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/preview-code/rite-evaluation/downloads","issues_url":"https://api.github.com/repos/preview-code/rite-evaluation/issues{/number}","pulls_url":"https://api.github.com/repos/preview-code/rite-evaluation/pulls{/number}","milestones_url":"https://api.github.com/repos/preview-code/rite-evaluation/milestones{/number}","notifications_url":"https://api.github.com/repos/preview-code/rite-evaluation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/preview-code/rite-evaluation/labels{/name}","releases_url":"https://api.github.com/repos/preview-code/rite-evaluation/releases{/id}","deployments_url":"https://api.github.com/repos/preview-code/rite-evaluation/deployments","created_at":"2016-04-29T08:09:35Z","updated_at":"2016-04-29T08:42:15Z","pushed_at":"2016-05-27T13:47:43Z","git_url":"git://github.com/preview-code/rite-evaluation.git","ssh_url":"git@github.com:preview-code/rite-evaluation.git","clone_url":"https://github.com/preview-code/rite-evaluation.git","svn_url":"https://github.com/preview-code/rite-evaluation","homepage":null,"size":342,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":43,"forks":1,"open_issues":43,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/preview-code/rite-evaluation/pulls/154"},"html":{"href":"https://github.com/preview-code/rite-evaluation/pull/154"},"issue":{"href":"https://api.github.com/repos/preview-code/rite-evaluation/issues/154"},"comments":{"href":"https://api.github.com/repos/preview-code/rite-evaluation/issues/154/comments"},"review_comments":{"href":"https://api.github.com/repos/preview-code/rite-evaluation/pulls/154/comments"},"review_comment":{"href":"https://api.github.com/repos/preview-code/rite-evaluation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/preview-code/rite-evaluation/pulls/154/commits"},"statuses":{"href":"https://api.github.com/repos/preview-code/rite-evaluation/statuses/7caa7a91f1011124fa374631606df80d9fe2c9d2"}}}}
{"actor":{"display_login":"TimvdLippe"}}