{"action":"created","comment":{"url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/pulls/comments/214367438","pull_request_review_id":151410666,"id":214367438,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNDM2NzQzOA==","diff_hunk":"@@ -34,56 +31,111 @@ describe(\"lesson browser plugin\", function() {\n     });\n     \n     describe(\"Lesson browser\", function() {\n-    \tit(\"It should initialized Lesson browser plugin\", function() {\n-            spyOn(pluginInstance, 'initialize').and.callThrough();\n-            pluginInstance.initialize(manifest);\n-            console.log(\"manifest\", manifest);\n-            console.log(\"pluginInstance\", pluginInstance);\n-            expect(pluginInstance.initialize).toHaveBeenCalled();\n-        });\n-        it(\"Should initialize the lesson browser without filters\", function(done) {\n-            spyOn($scope, \"initPreview\").and.callThrough();\n-            ecEditor.dispatchEvent('org.ekstep.lessonbrowser:show', {\n-                \"filters\": {\n-                    \"lessonType\": [\n-                    \"Resource\"\n-                    ]\n-                }\n+        describe(\"Init lesson browser\", function() {\n+            it(\"It should initialized Lesson browser plugin\", function() {\n+                spyOn(pluginInstance, 'initialize').and.callThrough();\n+                pluginInstance.initialize(manifest);\n+                expect(pluginInstance.initialize).toHaveBeenCalled();\n             });\n-            expect($scope.mainTemplate).toEqual(\"cardDetailsView\");\n-            done();\n-        });\n-        it(\"Should initialize the lesson browser with filters\", function(done) {\n-            spyOn($scope, \"initPreview\").and.callThrough();\n-            ecEditor.dispatchEvent('editor:invoke:viewall', {\n-                \"client\": \"org\",\n-                \"request\": {\n-                    \"mode\": \"soft\",\n-                    \"filters\": {\n-                    \"objectType\": [\n-                        \"Content\"\n-                    ],\n-                    \"status\": [\n-                        \"Live\"\n-                    ],\n-                    \"contentType\": [\n-                        \"Collection\",\n-                        \"Resource\",\n-                        \"Story\",\n-                        \"Worksheet\"\n-                    ]\n-                    },\n-                    \"offset\": 0,\n-                    \"limit\": 100,\n-                    \"softConstraints\": {\n-                    \"gradeLevel\": 100,\n-                    \"medium\": 50,\n-                    \"board\": 25\n+            it(\"Should initialize the lesson browser with filters\", function(done) {\n+                spyOn(pluginInstance, \"initPreview\").and.callThrough();\n+                var query = {\n+                    \"query\": {\n+                        \"lessonType\": [\n+                        \"Resource\"\n+                        ]\n                     }\n-                },\"callback\": callback()\n+                };\n+                ecEditor.dispatchEvent('org.ekstep.lessonbrowser:show', query);\n+                expect(pluginInstance.query).toEqual(query.query);\n+                done();\n+            });\n+            it(\"By dispatching editor:invoke:viewall event init preview should called\", function(done) {","path":"org.ekstep.lessonbrowser-1.4/test/editor/plugin.spec.js","position":84,"original_position":84,"commit_id":"aaddd861e2d63ffcbfbf874e6561c50c098b6ed1","original_commit_id":"aaddd861e2d63ffcbfbf874e6561c50c098b6ed1","user":{"login":"vinukumar-vs","id":4496096,"node_id":"MDQ6VXNlcjQ0OTYwOTY=","avatar_url":"https://avatars3.githubusercontent.com/u/4496096?v=4","gravatar_id":"","url":"https://api.github.com/users/vinukumar-vs","html_url":"https://github.com/vinukumar-vs","followers_url":"https://api.github.com/users/vinukumar-vs/followers","following_url":"https://api.github.com/users/vinukumar-vs/following{/other_user}","gists_url":"https://api.github.com/users/vinukumar-vs/gists{/gist_id}","starred_url":"https://api.github.com/users/vinukumar-vs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinukumar-vs/subscriptions","organizations_url":"https://api.github.com/users/vinukumar-vs/orgs","repos_url":"https://api.github.com/users/vinukumar-vs/repos","events_url":"https://api.github.com/users/vinukumar-vs/events{/privacy}","received_events_url":"https://api.github.com/users/vinukumar-vs/received_events","type":"User","site_admin":false},"body":"This should have more scenarios/test cases to verify.","created_at":"2018-08-31T14:14:50Z","updated_at":"2018-08-31T14:15:08Z","html_url":"https://github.com/project-sunbird/sunbird-content-plugins/pull/26#discussion_r214367438","pull_request_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/pulls/26","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/pulls/comments/214367438"},"html":{"href":"https://github.com/project-sunbird/sunbird-content-plugins/pull/26#discussion_r214367438"},"pull_request":{"href":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/pulls/26"}}},"pull_request":{"url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/pulls/26","id":212025297,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyMDI1Mjk3","html_url":"https://github.com/project-sunbird/sunbird-content-plugins/pull/26","diff_url":"https://github.com/project-sunbird/sunbird-content-plugins/pull/26.diff","patch_url":"https://github.com/project-sunbird/sunbird-content-plugins/pull/26.patch","issue_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/issues/26","number":26,"state":"open","locked":false,"title":"Issue #SB-6241 fix: Test cases - Dynamic filters for resource browser","user":{"login":"gouravmore","id":16605526,"node_id":"MDQ6VXNlcjE2NjA1NTI2","avatar_url":"https://avatars3.githubusercontent.com/u/16605526?v=4","gravatar_id":"","url":"https://api.github.com/users/gouravmore","html_url":"https://github.com/gouravmore","followers_url":"https://api.github.com/users/gouravmore/followers","following_url":"https://api.github.com/users/gouravmore/following{/other_user}","gists_url":"https://api.github.com/users/gouravmore/gists{/gist_id}","starred_url":"https://api.github.com/users/gouravmore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gouravmore/subscriptions","organizations_url":"https://api.github.com/users/gouravmore/orgs","repos_url":"https://api.github.com/users/gouravmore/repos","events_url":"https://api.github.com/users/gouravmore/events{/privacy}","received_events_url":"https://api.github.com/users/gouravmore/received_events","type":"User","site_admin":false},"body":"Issue #SB-6241 fix: Test cases - Dynamic filters for resource browser\r\n\r\n```lesson browser plugin\r\n    ✔ mock controller\r\n    Lesson browser\r\n      Init lesson browser\r\n        ✔ It should initialized Lesson browser plugin\r\n        ✔ Should initialize the lesson browser with filters\r\n        ✔ By dispatching editor:invoke:viewall event init preview should called\r\n      View all\r\n        ✔ ContentType filter should prefilled with Resource type\r\n        ✔ ContentType filter should prefilled with Collection type\r\n        ✔ CURRICULUM filter should prefilled with ICSE\r\n        ✔ CLASS filter should prefilled with Class 1\r\n        ✔ SUBJECT  filter should prefilled with English\r\n        ✔ MEDIUM  filter should prefilled with English\r\n```\r\n```\r\n80% Statements \r\n12/15 100% Branches \r\n4/4 33.33% Functions \r\n2/6 80% Lines \r\n12/15\r\n```","created_at":"2018-08-30T10:09:38Z","updated_at":"2018-08-31T14:15:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"af6c151da0b6d77b246045f8115160a6ee52eefe","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/pulls/26/commits","review_comments_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/pulls/26/comments","review_comment_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/pulls/comments{/number}","comments_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/issues/26/comments","statuses_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/statuses/aaddd861e2d63ffcbfbf874e6561c50c098b6ed1","head":{"label":"project-sunbird:testcase-lessonbrowser","ref":"testcase-lessonbrowser","sha":"aaddd861e2d63ffcbfbf874e6561c50c098b6ed1","user":{"login":"project-sunbird","id":26705730,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2NzA1NzMw","avatar_url":"https://avatars1.githubusercontent.com/u/26705730?v=4","gravatar_id":"","url":"https://api.github.com/users/project-sunbird","html_url":"https://github.com/project-sunbird","followers_url":"https://api.github.com/users/project-sunbird/followers","following_url":"https://api.github.com/users/project-sunbird/following{/other_user}","gists_url":"https://api.github.com/users/project-sunbird/gists{/gist_id}","starred_url":"https://api.github.com/users/project-sunbird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-sunbird/subscriptions","organizations_url":"https://api.github.com/users/project-sunbird/orgs","repos_url":"https://api.github.com/users/project-sunbird/repos","events_url":"https://api.github.com/users/project-sunbird/events{/privacy}","received_events_url":"https://api.github.com/users/project-sunbird/received_events","type":"Organization","site_admin":false},"repo":{"id":142141471,"node_id":"MDEwOlJlcG9zaXRvcnkxNDIxNDE0NzE=","name":"sunbird-content-plugins","full_name":"project-sunbird/sunbird-content-plugins","owner":{"login":"project-sunbird","id":26705730,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2NzA1NzMw","avatar_url":"https://avatars1.githubusercontent.com/u/26705730?v=4","gravatar_id":"","url":"https://api.github.com/users/project-sunbird","html_url":"https://github.com/project-sunbird","followers_url":"https://api.github.com/users/project-sunbird/followers","following_url":"https://api.github.com/users/project-sunbird/following{/other_user}","gists_url":"https://api.github.com/users/project-sunbird/gists{/gist_id}","starred_url":"https://api.github.com/users/project-sunbird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-sunbird/subscriptions","organizations_url":"https://api.github.com/users/project-sunbird/orgs","repos_url":"https://api.github.com/users/project-sunbird/repos","events_url":"https://api.github.com/users/project-sunbird/events{/privacy}","received_events_url":"https://api.github.com/users/project-sunbird/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/project-sunbird/sunbird-content-plugins","description":"Core features on interactive content editor","fork":false,"url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins","forks_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/forks","keys_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/teams","hooks_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/hooks","issue_events_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/issues/events{/number}","events_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/events","assignees_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/assignees{/user}","branches_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/branches{/branch}","tags_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/tags","blobs_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/git/refs{/sha}","trees_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/statuses/{sha}","languages_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/languages","stargazers_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/stargazers","contributors_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/contributors","subscribers_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/subscribers","subscription_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/subscription","commits_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/commits{/sha}","git_commits_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/git/commits{/sha}","comments_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/comments{/number}","issue_comment_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/issues/comments{/number}","contents_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/contents/{+path}","compare_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/merges","archive_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/downloads","issues_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/issues{/number}","pulls_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/pulls{/number}","milestones_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/milestones{/number}","notifications_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/labels{/name}","releases_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/releases{/id}","deployments_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/deployments","created_at":"2018-07-24T10:14:15Z","updated_at":"2018-08-10T05:19:40Z","pushed_at":"2018-08-31T14:06:58Z","git_url":"git://github.com/project-sunbird/sunbird-content-plugins.git","ssh_url":"git@github.com:project-sunbird/sunbird-content-plugins.git","clone_url":"https://github.com/project-sunbird/sunbird-content-plugins.git","svn_url":"https://github.com/project-sunbird/sunbird-content-plugins","homepage":"","size":11164,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":4,"watchers":2,"default_branch":"master"}},"base":{"label":"project-sunbird:release-1.10.0","ref":"release-1.10.0","sha":"e88948b6fa5be2d55805e83b45020d3d0efd8b38","user":{"login":"project-sunbird","id":26705730,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2NzA1NzMw","avatar_url":"https://avatars1.githubusercontent.com/u/26705730?v=4","gravatar_id":"","url":"https://api.github.com/users/project-sunbird","html_url":"https://github.com/project-sunbird","followers_url":"https://api.github.com/users/project-sunbird/followers","following_url":"https://api.github.com/users/project-sunbird/following{/other_user}","gists_url":"https://api.github.com/users/project-sunbird/gists{/gist_id}","starred_url":"https://api.github.com/users/project-sunbird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-sunbird/subscriptions","organizations_url":"https://api.github.com/users/project-sunbird/orgs","repos_url":"https://api.github.com/users/project-sunbird/repos","events_url":"https://api.github.com/users/project-sunbird/events{/privacy}","received_events_url":"https://api.github.com/users/project-sunbird/received_events","type":"Organization","site_admin":false},"repo":{"id":142141471,"node_id":"MDEwOlJlcG9zaXRvcnkxNDIxNDE0NzE=","name":"sunbird-content-plugins","full_name":"project-sunbird/sunbird-content-plugins","owner":{"login":"project-sunbird","id":26705730,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2NzA1NzMw","avatar_url":"https://avatars1.githubusercontent.com/u/26705730?v=4","gravatar_id":"","url":"https://api.github.com/users/project-sunbird","html_url":"https://github.com/project-sunbird","followers_url":"https://api.github.com/users/project-sunbird/followers","following_url":"https://api.github.com/users/project-sunbird/following{/other_user}","gists_url":"https://api.github.com/users/project-sunbird/gists{/gist_id}","starred_url":"https://api.github.com/users/project-sunbird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-sunbird/subscriptions","organizations_url":"https://api.github.com/users/project-sunbird/orgs","repos_url":"https://api.github.com/users/project-sunbird/repos","events_url":"https://api.github.com/users/project-sunbird/events{/privacy}","received_events_url":"https://api.github.com/users/project-sunbird/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/project-sunbird/sunbird-content-plugins","description":"Core features on interactive content editor","fork":false,"url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins","forks_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/forks","keys_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/teams","hooks_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/hooks","issue_events_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/issues/events{/number}","events_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/events","assignees_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/assignees{/user}","branches_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/branches{/branch}","tags_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/tags","blobs_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/git/refs{/sha}","trees_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/statuses/{sha}","languages_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/languages","stargazers_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/stargazers","contributors_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/contributors","subscribers_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/subscribers","subscription_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/subscription","commits_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/commits{/sha}","git_commits_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/git/commits{/sha}","comments_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/comments{/number}","issue_comment_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/issues/comments{/number}","contents_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/contents/{+path}","compare_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/merges","archive_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/downloads","issues_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/issues{/number}","pulls_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/pulls{/number}","milestones_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/milestones{/number}","notifications_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/labels{/name}","releases_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/releases{/id}","deployments_url":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/deployments","created_at":"2018-07-24T10:14:15Z","updated_at":"2018-08-10T05:19:40Z","pushed_at":"2018-08-31T14:06:58Z","git_url":"git://github.com/project-sunbird/sunbird-content-plugins.git","ssh_url":"git@github.com:project-sunbird/sunbird-content-plugins.git","clone_url":"https://github.com/project-sunbird/sunbird-content-plugins.git","svn_url":"https://github.com/project-sunbird/sunbird-content-plugins","homepage":"","size":11164,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":4,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/pulls/26"},"html":{"href":"https://github.com/project-sunbird/sunbird-content-plugins/pull/26"},"issue":{"href":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/issues/26"},"comments":{"href":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/project-sunbird/sunbird-content-plugins/statuses/aaddd861e2d63ffcbfbf874e6561c50c098b6ed1"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"vinukumar-vs"}}