{"action":"created","comment":{"url":"https://api.github.com/repos/thehyve/transmart-base-ui/pulls/comments/70797653","id":70797653,"diff_hunk":"@@ -24,4 +25,87 @@ describe('ChartService Unit Tests', function() {\n     expect(ChartService.nodes.length).toEqual(0);\n   });\n \n+  describe ('removeLabel', function () {\n+\n+    beforeEach(function () {\n+\n+      ChartService.reset();\n+      ChartService.cs.dims = [\n+        {dispose : function (){}}\n+      ];\n+      ChartService.cs.groups = [\n+        {dispose : function (){}}\n+      ];\n+      ChartService.cs.cross = {remove : function (){}};\n+\n+      spyOn(ChartService, 'updateDimensions');\n+    });\n+\n+    it('should invoke filterSubjectsByLabel', function () {\n+      spyOn(ChartService, 'filterSubjectsByLabel');\n+      ChartService.removeLabel({ids:0});\n+      expect(ChartService.filterSubjectsByLabel).toHaveBeenCalled();\n+    });\n+\n+    it('should invoke .cs.dims[0].dispose', function () {\n+      spyOn(ChartService.cs.dims[0], 'dispose');\n+      ChartService.removeLabel({ids:0});\n+      expect(ChartService.cs.dims[0].dispose).toHaveBeenCalled();\n+    });\n+\n+    it('should invoke .cs.groups[0].dispose', function () {\n+      spyOn(ChartService.cs.groups[0], 'dispose');\n+      ChartService.removeLabel({ids:0});\n+      expect(ChartService.cs.groups[0].dispose).toHaveBeenCalled();\n+    });\n+\n+    it('should invoke .cs.cross.remove', function () {\n+      ChartService.cs.labels = [{ids:0}];\n+      spyOn(ChartService.cs.cross, 'remove');\n+      ChartService.removeLabel({ids:0});\n+      expect(ChartService.cs.cross.remove).toHaveBeenCalled();\n+    });\n+\n+    it('should not invoke .cs.cross.remove', function () {\n+      ChartService.cs.labels = [{ids:0}, {ids:1}];\n+      spyOn(ChartService.cs.cross, 'remove');\n+      ChartService.removeLabel({ids:0});\n+      expect(ChartService.cs.cross.remove).not.toHaveBeenCalled();\n+    });\n+\n+    it('should invoke $broadcast', function () {\n+      spyOn($rootScope, '$broadcast');\n+      ChartService.removeLabel({ids:0});\n+      expect($rootScope.$broadcast).toHaveBeenCalled();\n+    });\n+\n+    it('should invoke dc.redrawAll', function () {\n+      spyOn(dc, 'redrawAll');\n+      ChartService.removeLabel({ids:0});\n+      expect(dc.redrawAll).toHaveBeenCalled();\n+    });\n+\n+    it('should invoke updateDimensions', function () {\n+      ChartService.removeLabel({ids:0});\n+      expect(ChartService.updateDimensions).toHaveBeenCalled();\n+    });\n+\n+  });\n+\n+  describe('filterSubjectsByLabel', function () {\n+    var _subjects, _label;\n+\n+    beforeEach(function () {\n+      _subjects = [\n+        {labels : ['label1']}\n+      ];\n+      _label = {ids : 0};\n+    });\n+\n+    it('should invoke updateDimensions', function () {","path":"src/app/components/services/chart.service.spec.js","position":99,"original_position":99,"commit_id":"d4c1d9e39e302a2cadeaf761eb6457fd5818d301","original_commit_id":"d4c1d9e39e302a2cadeaf761eb6457fd5818d301","user":{"login":"kretep","id":5700440,"avatar_url":"https://avatars.githubusercontent.com/u/5700440?v=3","gravatar_id":"","url":"https://api.github.com/users/kretep","html_url":"https://github.com/kretep","followers_url":"https://api.github.com/users/kretep/followers","following_url":"https://api.github.com/users/kretep/following{/other_user}","gists_url":"https://api.github.com/users/kretep/gists{/gist_id}","starred_url":"https://api.github.com/users/kretep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kretep/subscriptions","organizations_url":"https://api.github.com/users/kretep/orgs","repos_url":"https://api.github.com/users/kretep/repos","events_url":"https://api.github.com/users/kretep/events{/privacy}","received_events_url":"https://api.github.com/users/kretep/received_events","type":"User","site_admin":false},"body":"Does this match the expectation?","created_at":"2016-07-14T12:41:46Z","updated_at":"2016-07-14T12:41:46Z","html_url":"https://github.com/thehyve/transmart-base-ui/pull/132#discussion_r70797653","pull_request_url":"https://api.github.com/repos/thehyve/transmart-base-ui/pulls/132","_links":{"self":{"href":"https://api.github.com/repos/thehyve/transmart-base-ui/pulls/comments/70797653"},"html":{"href":"https://github.com/thehyve/transmart-base-ui/pull/132#discussion_r70797653"},"pull_request":{"href":"https://api.github.com/repos/thehyve/transmart-base-ui/pulls/132"}}},"pull_request":{"url":"https://api.github.com/repos/thehyve/transmart-base-ui/pulls/132","id":77313120,"html_url":"https://github.com/thehyve/transmart-base-ui/pull/132","diff_url":"https://github.com/thehyve/transmart-base-ui/pull/132.diff","patch_url":"https://github.com/thehyve/transmart-base-ui/pull/132.patch","issue_url":"https://api.github.com/repos/thehyve/transmart-base-ui/issues/132","number":132,"state":"open","locked":false,"title":"Fix remove filtered chart","user":{"login":"rnugraha","id":2835281,"avatar_url":"https://avatars.githubusercontent.com/u/2835281?v=3","gravatar_id":"","url":"https://api.github.com/users/rnugraha","html_url":"https://github.com/rnugraha","followers_url":"https://api.github.com/users/rnugraha/followers","following_url":"https://api.github.com/users/rnugraha/following{/other_user}","gists_url":"https://api.github.com/users/rnugraha/gists{/gist_id}","starred_url":"https://api.github.com/users/rnugraha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnugraha/subscriptions","organizations_url":"https://api.github.com/users/rnugraha/orgs","repos_url":"https://api.github.com/users/rnugraha/repos","events_url":"https://api.github.com/users/rnugraha/events{/privacy}","received_events_url":"https://api.github.com/users/rnugraha/received_events","type":"User","site_admin":false},"body":"- fix issue whereas removing label / chart messed up the filtering\r\n- refactor remove label\r\n- minor additional info stats on README.md","created_at":"2016-07-13T15:47:02Z","updated_at":"2016-07-14T12:41:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c84469fd54635d72855e9d93f095051562655bc8","assignee":{"login":"beaugogh","id":3026681,"avatar_url":"https://avatars.githubusercontent.com/u/3026681?v=3","gravatar_id":"","url":"https://api.github.com/users/beaugogh","html_url":"https://github.com/beaugogh","followers_url":"https://api.github.com/users/beaugogh/followers","following_url":"https://api.github.com/users/beaugogh/following{/other_user}","gists_url":"https://api.github.com/users/beaugogh/gists{/gist_id}","starred_url":"https://api.github.com/users/beaugogh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beaugogh/subscriptions","organizations_url":"https://api.github.com/users/beaugogh/orgs","repos_url":"https://api.github.com/users/beaugogh/repos","events_url":"https://api.github.com/users/beaugogh/events{/privacy}","received_events_url":"https://api.github.com/users/beaugogh/received_events","type":"User","site_admin":false},"assignees":[{"login":"beaugogh","id":3026681,"avatar_url":"https://avatars.githubusercontent.com/u/3026681?v=3","gravatar_id":"","url":"https://api.github.com/users/beaugogh","html_url":"https://github.com/beaugogh","followers_url":"https://api.github.com/users/beaugogh/followers","following_url":"https://api.github.com/users/beaugogh/following{/other_user}","gists_url":"https://api.github.com/users/beaugogh/gists{/gist_id}","starred_url":"https://api.github.com/users/beaugogh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beaugogh/subscriptions","organizations_url":"https://api.github.com/users/beaugogh/orgs","repos_url":"https://api.github.com/users/beaugogh/repos","events_url":"https://api.github.com/users/beaugogh/events{/privacy}","received_events_url":"https://api.github.com/users/beaugogh/received_events","type":"User","site_admin":false},{"login":"kretep","id":5700440,"avatar_url":"https://avatars.githubusercontent.com/u/5700440?v=3","gravatar_id":"","url":"https://api.github.com/users/kretep","html_url":"https://github.com/kretep","followers_url":"https://api.github.com/users/kretep/followers","following_url":"https://api.github.com/users/kretep/following{/other_user}","gists_url":"https://api.github.com/users/kretep/gists{/gist_id}","starred_url":"https://api.github.com/users/kretep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kretep/subscriptions","organizations_url":"https://api.github.com/users/kretep/orgs","repos_url":"https://api.github.com/users/kretep/repos","events_url":"https://api.github.com/users/kretep/events{/privacy}","received_events_url":"https://api.github.com/users/kretep/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/thehyve/transmart-base-ui/pulls/132/commits","review_comments_url":"https://api.github.com/repos/thehyve/transmart-base-ui/pulls/132/comments","review_comment_url":"https://api.github.com/repos/thehyve/transmart-base-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thehyve/transmart-base-ui/issues/132/comments","statuses_url":"https://api.github.com/repos/thehyve/transmart-base-ui/statuses/d4c1d9e39e302a2cadeaf761eb6457fd5818d301","head":{"label":"thehyve:fix-remove-filtered-chart","ref":"fix-remove-filtered-chart","sha":"d4c1d9e39e302a2cadeaf761eb6457fd5818d301","user":{"login":"thehyve","id":1502440,"avatar_url":"https://avatars.githubusercontent.com/u/1502440?v=3","gravatar_id":"","url":"https://api.github.com/users/thehyve","html_url":"https://github.com/thehyve","followers_url":"https://api.github.com/users/thehyve/followers","following_url":"https://api.github.com/users/thehyve/following{/other_user}","gists_url":"https://api.github.com/users/thehyve/gists{/gist_id}","starred_url":"https://api.github.com/users/thehyve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thehyve/subscriptions","organizations_url":"https://api.github.com/users/thehyve/orgs","repos_url":"https://api.github.com/users/thehyve/repos","events_url":"https://api.github.com/users/thehyve/events{/privacy}","received_events_url":"https://api.github.com/users/thehyve/received_events","type":"Organization","site_admin":false},"repo":{"id":31586877,"name":"transmart-base-ui","full_name":"thehyve/transmart-base-ui","owner":{"login":"thehyve","id":1502440,"avatar_url":"https://avatars.githubusercontent.com/u/1502440?v=3","gravatar_id":"","url":"https://api.github.com/users/thehyve","html_url":"https://github.com/thehyve","followers_url":"https://api.github.com/users/thehyve/followers","following_url":"https://api.github.com/users/thehyve/following{/other_user}","gists_url":"https://api.github.com/users/thehyve/gists{/gist_id}","starred_url":"https://api.github.com/users/thehyve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thehyve/subscriptions","organizations_url":"https://api.github.com/users/thehyve/orgs","repos_url":"https://api.github.com/users/thehyve/repos","events_url":"https://api.github.com/users/thehyve/events{/privacy}","received_events_url":"https://api.github.com/users/thehyve/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thehyve/transmart-base-ui","description":"Boilerplate code for tranSMART UI","fork":true,"url":"https://api.github.com/repos/thehyve/transmart-base-ui","forks_url":"https://api.github.com/repos/thehyve/transmart-base-ui/forks","keys_url":"https://api.github.com/repos/thehyve/transmart-base-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thehyve/transmart-base-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thehyve/transmart-base-ui/teams","hooks_url":"https://api.github.com/repos/thehyve/transmart-base-ui/hooks","issue_events_url":"https://api.github.com/repos/thehyve/transmart-base-ui/issues/events{/number}","events_url":"https://api.github.com/repos/thehyve/transmart-base-ui/events","assignees_url":"https://api.github.com/repos/thehyve/transmart-base-ui/assignees{/user}","branches_url":"https://api.github.com/repos/thehyve/transmart-base-ui/branches{/branch}","tags_url":"https://api.github.com/repos/thehyve/transmart-base-ui/tags","blobs_url":"https://api.github.com/repos/thehyve/transmart-base-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thehyve/transmart-base-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thehyve/transmart-base-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/thehyve/transmart-base-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thehyve/transmart-base-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/thehyve/transmart-base-ui/languages","stargazers_url":"https://api.github.com/repos/thehyve/transmart-base-ui/stargazers","contributors_url":"https://api.github.com/repos/thehyve/transmart-base-ui/contributors","subscribers_url":"https://api.github.com/repos/thehyve/transmart-base-ui/subscribers","subscription_url":"https://api.github.com/repos/thehyve/transmart-base-ui/subscription","commits_url":"https://api.github.com/repos/thehyve/transmart-base-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/thehyve/transmart-base-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/thehyve/transmart-base-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/thehyve/transmart-base-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/thehyve/transmart-base-ui/contents/{+path}","compare_url":"https://api.github.com/repos/thehyve/transmart-base-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thehyve/transmart-base-ui/merges","archive_url":"https://api.github.com/repos/thehyve/transmart-base-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thehyve/transmart-base-ui/downloads","issues_url":"https://api.github.com/repos/thehyve/transmart-base-ui/issues{/number}","pulls_url":"https://api.github.com/repos/thehyve/transmart-base-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/thehyve/transmart-base-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/thehyve/transmart-base-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thehyve/transmart-base-ui/labels{/name}","releases_url":"https://api.github.com/repos/thehyve/transmart-base-ui/releases{/id}","deployments_url":"https://api.github.com/repos/thehyve/transmart-base-ui/deployments","created_at":"2015-03-03T08:11:34Z","updated_at":"2016-05-24T13:03:02Z","pushed_at":"2016-07-14T12:33:45Z","git_url":"git://github.com/thehyve/transmart-base-ui.git","ssh_url":"git@github.com:thehyve/transmart-base-ui.git","clone_url":"https://github.com/thehyve/transmart-base-ui.git","svn_url":"https://github.com/thehyve/transmart-base-ui","homepage":null,"size":939,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":3,"default_branch":"dev"}},"base":{"label":"thehyve:dev","ref":"dev","sha":"506b6b168fc686c2948b17eaac70c2fcd2a75a48","user":{"login":"thehyve","id":1502440,"avatar_url":"https://avatars.githubusercontent.com/u/1502440?v=3","gravatar_id":"","url":"https://api.github.com/users/thehyve","html_url":"https://github.com/thehyve","followers_url":"https://api.github.com/users/thehyve/followers","following_url":"https://api.github.com/users/thehyve/following{/other_user}","gists_url":"https://api.github.com/users/thehyve/gists{/gist_id}","starred_url":"https://api.github.com/users/thehyve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thehyve/subscriptions","organizations_url":"https://api.github.com/users/thehyve/orgs","repos_url":"https://api.github.com/users/thehyve/repos","events_url":"https://api.github.com/users/thehyve/events{/privacy}","received_events_url":"https://api.github.com/users/thehyve/received_events","type":"Organization","site_admin":false},"repo":{"id":31586877,"name":"transmart-base-ui","full_name":"thehyve/transmart-base-ui","owner":{"login":"thehyve","id":1502440,"avatar_url":"https://avatars.githubusercontent.com/u/1502440?v=3","gravatar_id":"","url":"https://api.github.com/users/thehyve","html_url":"https://github.com/thehyve","followers_url":"https://api.github.com/users/thehyve/followers","following_url":"https://api.github.com/users/thehyve/following{/other_user}","gists_url":"https://api.github.com/users/thehyve/gists{/gist_id}","starred_url":"https://api.github.com/users/thehyve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thehyve/subscriptions","organizations_url":"https://api.github.com/users/thehyve/orgs","repos_url":"https://api.github.com/users/thehyve/repos","events_url":"https://api.github.com/users/thehyve/events{/privacy}","received_events_url":"https://api.github.com/users/thehyve/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thehyve/transmart-base-ui","description":"Boilerplate code for tranSMART UI","fork":true,"url":"https://api.github.com/repos/thehyve/transmart-base-ui","forks_url":"https://api.github.com/repos/thehyve/transmart-base-ui/forks","keys_url":"https://api.github.com/repos/thehyve/transmart-base-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thehyve/transmart-base-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thehyve/transmart-base-ui/teams","hooks_url":"https://api.github.com/repos/thehyve/transmart-base-ui/hooks","issue_events_url":"https://api.github.com/repos/thehyve/transmart-base-ui/issues/events{/number}","events_url":"https://api.github.com/repos/thehyve/transmart-base-ui/events","assignees_url":"https://api.github.com/repos/thehyve/transmart-base-ui/assignees{/user}","branches_url":"https://api.github.com/repos/thehyve/transmart-base-ui/branches{/branch}","tags_url":"https://api.github.com/repos/thehyve/transmart-base-ui/tags","blobs_url":"https://api.github.com/repos/thehyve/transmart-base-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thehyve/transmart-base-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thehyve/transmart-base-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/thehyve/transmart-base-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thehyve/transmart-base-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/thehyve/transmart-base-ui/languages","stargazers_url":"https://api.github.com/repos/thehyve/transmart-base-ui/stargazers","contributors_url":"https://api.github.com/repos/thehyve/transmart-base-ui/contributors","subscribers_url":"https://api.github.com/repos/thehyve/transmart-base-ui/subscribers","subscription_url":"https://api.github.com/repos/thehyve/transmart-base-ui/subscription","commits_url":"https://api.github.com/repos/thehyve/transmart-base-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/thehyve/transmart-base-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/thehyve/transmart-base-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/thehyve/transmart-base-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/thehyve/transmart-base-ui/contents/{+path}","compare_url":"https://api.github.com/repos/thehyve/transmart-base-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thehyve/transmart-base-ui/merges","archive_url":"https://api.github.com/repos/thehyve/transmart-base-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thehyve/transmart-base-ui/downloads","issues_url":"https://api.github.com/repos/thehyve/transmart-base-ui/issues{/number}","pulls_url":"https://api.github.com/repos/thehyve/transmart-base-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/thehyve/transmart-base-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/thehyve/transmart-base-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thehyve/transmart-base-ui/labels{/name}","releases_url":"https://api.github.com/repos/thehyve/transmart-base-ui/releases{/id}","deployments_url":"https://api.github.com/repos/thehyve/transmart-base-ui/deployments","created_at":"2015-03-03T08:11:34Z","updated_at":"2016-05-24T13:03:02Z","pushed_at":"2016-07-14T12:33:45Z","git_url":"git://github.com/thehyve/transmart-base-ui.git","ssh_url":"git@github.com:thehyve/transmart-base-ui.git","clone_url":"https://github.com/thehyve/transmart-base-ui.git","svn_url":"https://github.com/thehyve/transmart-base-ui","homepage":null,"size":939,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":3,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/thehyve/transmart-base-ui/pulls/132"},"html":{"href":"https://github.com/thehyve/transmart-base-ui/pull/132"},"issue":{"href":"https://api.github.com/repos/thehyve/transmart-base-ui/issues/132"},"comments":{"href":"https://api.github.com/repos/thehyve/transmart-base-ui/issues/132/comments"},"review_comments":{"href":"https://api.github.com/repos/thehyve/transmart-base-ui/pulls/132/comments"},"review_comment":{"href":"https://api.github.com/repos/thehyve/transmart-base-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thehyve/transmart-base-ui/pulls/132/commits"},"statuses":{"href":"https://api.github.com/repos/thehyve/transmart-base-ui/statuses/d4c1d9e39e302a2cadeaf761eb6457fd5818d301"}}}}
{"actor":{"display_login":"kretep"}}