{"action":"created","comment":{"url":"https://api.github.com/repos/davehunt/pytest-html/pulls/comments/66236917","id":66236917,"diff_hunk":"@@ -160,33 +156,31 @@ function toggle_sort_states(elem) {\n     }\n }\n \n-function split_extra_onto_two_rows() {\n-    find_all('tr.results-table-row').forEach(function(elem) {\n-        var new_row = document.createElement(\"tr\")\n-        new_row.className = \"extra\";\n-        elem.parentNode.insertBefore(new_row, elem.nextSibling);\n-        find_all(\".extra\", elem).forEach(function (td_elem) {\n-            if (find(\"*:not(.empty)\", td_elem)) {\n-                new_row.appendChild(td_elem);\n-                td_elem.colSpan=5;\n-            } else {\n-                td_elem.parentNode.removeChild(td_elem);\n-            }\n-        });\n-    });\n+function is_all_rows_hidden() {\n+    var rows = find_all('.results-table-row');\n+    if(rows.length == 0)","path":"pytest_html/resources/main.js","position":81,"original_position":81,"commit_id":"8dde0f54bb73153e54c88c948e6228179076d20c","original_commit_id":"8dde0f54bb73153e54c88c948e6228179076d20c","user":{"login":"davehunt","id":122800,"avatar_url":"https://avatars.githubusercontent.com/u/122800?v=3","gravatar_id":"","url":"https://api.github.com/users/davehunt","html_url":"https://github.com/davehunt","followers_url":"https://api.github.com/users/davehunt/followers","following_url":"https://api.github.com/users/davehunt/following{/other_user}","gists_url":"https://api.github.com/users/davehunt/gists{/gist_id}","starred_url":"https://api.github.com/users/davehunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davehunt/subscriptions","organizations_url":"https://api.github.com/users/davehunt/orgs","repos_url":"https://api.github.com/users/davehunt/repos","events_url":"https://api.github.com/users/davehunt/events{/privacy}","received_events_url":"https://api.github.com/users/davehunt/received_events","type":"User","site_admin":false},"body":"Could you use a [filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) here, to reduce the array to only rows that are not hidden. Then you can just return the result of checking the length against zero.","created_at":"2016-06-08T11:16:13Z","updated_at":"2016-06-08T11:16:13Z","html_url":"https://github.com/davehunt/pytest-html/pull/46#discussion_r66236917","pull_request_url":"https://api.github.com/repos/davehunt/pytest-html/pulls/46","_links":{"self":{"href":"https://api.github.com/repos/davehunt/pytest-html/pulls/comments/66236917"},"html":{"href":"https://github.com/davehunt/pytest-html/pull/46#discussion_r66236917"},"pull_request":{"href":"https://api.github.com/repos/davehunt/pytest-html/pulls/46"}}},"pull_request":{"url":"https://api.github.com/repos/davehunt/pytest-html/pulls/46","id":71418263,"html_url":"https://github.com/davehunt/pytest-html/pull/46","diff_url":"https://github.com/davehunt/pytest-html/pull/46.diff","patch_url":"https://github.com/davehunt/pytest-html/pull/46.patch","issue_url":"https://api.github.com/repos/davehunt/pytest-html/issues/46","number":46,"state":"open","locked":false,"title":"Filter the tests results by outcome #issue38","user":{"login":"RibeiroAna","id":7302792,"avatar_url":"https://avatars.githubusercontent.com/u/7302792?v=3","gravatar_id":"","url":"https://api.github.com/users/RibeiroAna","html_url":"https://github.com/RibeiroAna","followers_url":"https://api.github.com/users/RibeiroAna/followers","following_url":"https://api.github.com/users/RibeiroAna/following{/other_user}","gists_url":"https://api.github.com/users/RibeiroAna/gists{/gist_id}","starred_url":"https://api.github.com/users/RibeiroAna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RibeiroAna/subscriptions","organizations_url":"https://api.github.com/users/RibeiroAna/orgs","repos_url":"https://api.github.com/users/RibeiroAna/repos","events_url":"https://api.github.com/users/RibeiroAna/events{/privacy}","received_events_url":"https://api.github.com/users/RibeiroAna/received_events","type":"User","site_admin":false},"body":"How it looks: when the page is first loaded, there are checked check-boxes and by checking and unchecking the boxes, the users can filter which tests they want to see. If there are no tests of one outcome, the checkbox is disabled.\r\n\r\n![image screenshot](https://camo.githubusercontent.com/c945c72d28f1dc827bed0a84676951a2c56123c0/687474703a2f2f6f6936372e74696e797069632e636f6d2f723837306a362e6a7067)","created_at":"2016-05-25T16:03:08Z","updated_at":"2016-06-08T11:16:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"10e546f78fa5c24b0de47f1aeca3f4972f1c0164","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/davehunt/pytest-html/pulls/46/commits","review_comments_url":"https://api.github.com/repos/davehunt/pytest-html/pulls/46/comments","review_comment_url":"https://api.github.com/repos/davehunt/pytest-html/pulls/comments{/number}","comments_url":"https://api.github.com/repos/davehunt/pytest-html/issues/46/comments","statuses_url":"https://api.github.com/repos/davehunt/pytest-html/statuses/8dde0f54bb73153e54c88c948e6228179076d20c","head":{"label":"RibeiroAna:filterTestsOutcomes","ref":"filterTestsOutcomes","sha":"8dde0f54bb73153e54c88c948e6228179076d20c","user":{"login":"RibeiroAna","id":7302792,"avatar_url":"https://avatars.githubusercontent.com/u/7302792?v=3","gravatar_id":"","url":"https://api.github.com/users/RibeiroAna","html_url":"https://github.com/RibeiroAna","followers_url":"https://api.github.com/users/RibeiroAna/followers","following_url":"https://api.github.com/users/RibeiroAna/following{/other_user}","gists_url":"https://api.github.com/users/RibeiroAna/gists{/gist_id}","starred_url":"https://api.github.com/users/RibeiroAna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RibeiroAna/subscriptions","organizations_url":"https://api.github.com/users/RibeiroAna/orgs","repos_url":"https://api.github.com/users/RibeiroAna/repos","events_url":"https://api.github.com/users/RibeiroAna/events{/privacy}","received_events_url":"https://api.github.com/users/RibeiroAna/received_events","type":"User","site_admin":false},"repo":{"id":53634800,"name":"pytest-html","full_name":"RibeiroAna/pytest-html","owner":{"login":"RibeiroAna","id":7302792,"avatar_url":"https://avatars.githubusercontent.com/u/7302792?v=3","gravatar_id":"","url":"https://api.github.com/users/RibeiroAna","html_url":"https://github.com/RibeiroAna","followers_url":"https://api.github.com/users/RibeiroAna/followers","following_url":"https://api.github.com/users/RibeiroAna/following{/other_user}","gists_url":"https://api.github.com/users/RibeiroAna/gists{/gist_id}","starred_url":"https://api.github.com/users/RibeiroAna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RibeiroAna/subscriptions","organizations_url":"https://api.github.com/users/RibeiroAna/orgs","repos_url":"https://api.github.com/users/RibeiroAna/repos","events_url":"https://api.github.com/users/RibeiroAna/events{/privacy}","received_events_url":"https://api.github.com/users/RibeiroAna/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RibeiroAna/pytest-html","description":"Plugin for generating HTML reports for py.test results","fork":true,"url":"https://api.github.com/repos/RibeiroAna/pytest-html","forks_url":"https://api.github.com/repos/RibeiroAna/pytest-html/forks","keys_url":"https://api.github.com/repos/RibeiroAna/pytest-html/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RibeiroAna/pytest-html/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RibeiroAna/pytest-html/teams","hooks_url":"https://api.github.com/repos/RibeiroAna/pytest-html/hooks","issue_events_url":"https://api.github.com/repos/RibeiroAna/pytest-html/issues/events{/number}","events_url":"https://api.github.com/repos/RibeiroAna/pytest-html/events","assignees_url":"https://api.github.com/repos/RibeiroAna/pytest-html/assignees{/user}","branches_url":"https://api.github.com/repos/RibeiroAna/pytest-html/branches{/branch}","tags_url":"https://api.github.com/repos/RibeiroAna/pytest-html/tags","blobs_url":"https://api.github.com/repos/RibeiroAna/pytest-html/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RibeiroAna/pytest-html/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RibeiroAna/pytest-html/git/refs{/sha}","trees_url":"https://api.github.com/repos/RibeiroAna/pytest-html/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RibeiroAna/pytest-html/statuses/{sha}","languages_url":"https://api.github.com/repos/RibeiroAna/pytest-html/languages","stargazers_url":"https://api.github.com/repos/RibeiroAna/pytest-html/stargazers","contributors_url":"https://api.github.com/repos/RibeiroAna/pytest-html/contributors","subscribers_url":"https://api.github.com/repos/RibeiroAna/pytest-html/subscribers","subscription_url":"https://api.github.com/repos/RibeiroAna/pytest-html/subscription","commits_url":"https://api.github.com/repos/RibeiroAna/pytest-html/commits{/sha}","git_commits_url":"https://api.github.com/repos/RibeiroAna/pytest-html/git/commits{/sha}","comments_url":"https://api.github.com/repos/RibeiroAna/pytest-html/comments{/number}","issue_comment_url":"https://api.github.com/repos/RibeiroAna/pytest-html/issues/comments{/number}","contents_url":"https://api.github.com/repos/RibeiroAna/pytest-html/contents/{+path}","compare_url":"https://api.github.com/repos/RibeiroAna/pytest-html/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RibeiroAna/pytest-html/merges","archive_url":"https://api.github.com/repos/RibeiroAna/pytest-html/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RibeiroAna/pytest-html/downloads","issues_url":"https://api.github.com/repos/RibeiroAna/pytest-html/issues{/number}","pulls_url":"https://api.github.com/repos/RibeiroAna/pytest-html/pulls{/number}","milestones_url":"https://api.github.com/repos/RibeiroAna/pytest-html/milestones{/number}","notifications_url":"https://api.github.com/repos/RibeiroAna/pytest-html/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RibeiroAna/pytest-html/labels{/name}","releases_url":"https://api.github.com/repos/RibeiroAna/pytest-html/releases{/id}","deployments_url":"https://api.github.com/repos/RibeiroAna/pytest-html/deployments","created_at":"2016-03-11T02:54:56Z","updated_at":"2016-03-11T02:54:56Z","pushed_at":"2016-06-07T22:36:54Z","git_url":"git://github.com/RibeiroAna/pytest-html.git","ssh_url":"git@github.com:RibeiroAna/pytest-html.git","clone_url":"https://github.com/RibeiroAna/pytest-html.git","svn_url":"https://github.com/RibeiroAna/pytest-html","homepage":null,"size":124,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"davehunt:master","ref":"master","sha":"ebe6280760c54abee139721beaa6e50b465c5feb","user":{"login":"davehunt","id":122800,"avatar_url":"https://avatars.githubusercontent.com/u/122800?v=3","gravatar_id":"","url":"https://api.github.com/users/davehunt","html_url":"https://github.com/davehunt","followers_url":"https://api.github.com/users/davehunt/followers","following_url":"https://api.github.com/users/davehunt/following{/other_user}","gists_url":"https://api.github.com/users/davehunt/gists{/gist_id}","starred_url":"https://api.github.com/users/davehunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davehunt/subscriptions","organizations_url":"https://api.github.com/users/davehunt/orgs","repos_url":"https://api.github.com/users/davehunt/repos","events_url":"https://api.github.com/users/davehunt/events{/privacy}","received_events_url":"https://api.github.com/users/davehunt/received_events","type":"User","site_admin":false},"repo":{"id":33952074,"name":"pytest-html","full_name":"davehunt/pytest-html","owner":{"login":"davehunt","id":122800,"avatar_url":"https://avatars.githubusercontent.com/u/122800?v=3","gravatar_id":"","url":"https://api.github.com/users/davehunt","html_url":"https://github.com/davehunt","followers_url":"https://api.github.com/users/davehunt/followers","following_url":"https://api.github.com/users/davehunt/following{/other_user}","gists_url":"https://api.github.com/users/davehunt/gists{/gist_id}","starred_url":"https://api.github.com/users/davehunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davehunt/subscriptions","organizations_url":"https://api.github.com/users/davehunt/orgs","repos_url":"https://api.github.com/users/davehunt/repos","events_url":"https://api.github.com/users/davehunt/events{/privacy}","received_events_url":"https://api.github.com/users/davehunt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/davehunt/pytest-html","description":"Plugin for generating HTML reports for py.test results","fork":false,"url":"https://api.github.com/repos/davehunt/pytest-html","forks_url":"https://api.github.com/repos/davehunt/pytest-html/forks","keys_url":"https://api.github.com/repos/davehunt/pytest-html/keys{/key_id}","collaborators_url":"https://api.github.com/repos/davehunt/pytest-html/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/davehunt/pytest-html/teams","hooks_url":"https://api.github.com/repos/davehunt/pytest-html/hooks","issue_events_url":"https://api.github.com/repos/davehunt/pytest-html/issues/events{/number}","events_url":"https://api.github.com/repos/davehunt/pytest-html/events","assignees_url":"https://api.github.com/repos/davehunt/pytest-html/assignees{/user}","branches_url":"https://api.github.com/repos/davehunt/pytest-html/branches{/branch}","tags_url":"https://api.github.com/repos/davehunt/pytest-html/tags","blobs_url":"https://api.github.com/repos/davehunt/pytest-html/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/davehunt/pytest-html/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/davehunt/pytest-html/git/refs{/sha}","trees_url":"https://api.github.com/repos/davehunt/pytest-html/git/trees{/sha}","statuses_url":"https://api.github.com/repos/davehunt/pytest-html/statuses/{sha}","languages_url":"https://api.github.com/repos/davehunt/pytest-html/languages","stargazers_url":"https://api.github.com/repos/davehunt/pytest-html/stargazers","contributors_url":"https://api.github.com/repos/davehunt/pytest-html/contributors","subscribers_url":"https://api.github.com/repos/davehunt/pytest-html/subscribers","subscription_url":"https://api.github.com/repos/davehunt/pytest-html/subscription","commits_url":"https://api.github.com/repos/davehunt/pytest-html/commits{/sha}","git_commits_url":"https://api.github.com/repos/davehunt/pytest-html/git/commits{/sha}","comments_url":"https://api.github.com/repos/davehunt/pytest-html/comments{/number}","issue_comment_url":"https://api.github.com/repos/davehunt/pytest-html/issues/comments{/number}","contents_url":"https://api.github.com/repos/davehunt/pytest-html/contents/{+path}","compare_url":"https://api.github.com/repos/davehunt/pytest-html/compare/{base}...{head}","merges_url":"https://api.github.com/repos/davehunt/pytest-html/merges","archive_url":"https://api.github.com/repos/davehunt/pytest-html/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/davehunt/pytest-html/downloads","issues_url":"https://api.github.com/repos/davehunt/pytest-html/issues{/number}","pulls_url":"https://api.github.com/repos/davehunt/pytest-html/pulls{/number}","milestones_url":"https://api.github.com/repos/davehunt/pytest-html/milestones{/number}","notifications_url":"https://api.github.com/repos/davehunt/pytest-html/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/davehunt/pytest-html/labels{/name}","releases_url":"https://api.github.com/repos/davehunt/pytest-html/releases{/id}","deployments_url":"https://api.github.com/repos/davehunt/pytest-html/deployments","created_at":"2015-04-14T19:22:42Z","updated_at":"2016-06-06T17:09:47Z","pushed_at":"2016-06-07T22:36:54Z","git_url":"git://github.com/davehunt/pytest-html.git","ssh_url":"git@github.com:davehunt/pytest-html.git","clone_url":"https://github.com/davehunt/pytest-html.git","svn_url":"https://github.com/davehunt/pytest-html","homepage":null,"size":142,"stargazers_count":28,"watchers_count":28,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":17,"forks":24,"open_issues":17,"watchers":28,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/davehunt/pytest-html/pulls/46"},"html":{"href":"https://github.com/davehunt/pytest-html/pull/46"},"issue":{"href":"https://api.github.com/repos/davehunt/pytest-html/issues/46"},"comments":{"href":"https://api.github.com/repos/davehunt/pytest-html/issues/46/comments"},"review_comments":{"href":"https://api.github.com/repos/davehunt/pytest-html/pulls/46/comments"},"review_comment":{"href":"https://api.github.com/repos/davehunt/pytest-html/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/davehunt/pytest-html/pulls/46/commits"},"statuses":{"href":"https://api.github.com/repos/davehunt/pytest-html/statuses/8dde0f54bb73153e54c88c948e6228179076d20c"}}}}
{"actor":{"display_login":"davehunt"}}