{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/comments/25711682","id":25711682,"diff_hunk":"@@ -129,7 +129,54 @@ define(['jquery', 'coffee/src/instructor_dashboard/student_admin', 'js/common_he\n                 expect(studentadmin.$request_response_error_ee.text()).toEqual(full_error_message);\n             });\n \n-            it('binds delete student state for entrance exam ajax call and the result will be success', function() {\n+            it('initiates skip entrance exam when button is clicked', function() {\n+                studentadmin.$btn_skip_entrance_exam.click();\n+                // expect error to be shown since student identifier is not set\n+                expect(studentadmin.$request_response_error_ee.text()).toEqual(gettext(\"Enter a student's username or email address.\"));\n+\n+                var success_message = gettext(\"This student ('{student_id}') will skip the entrance exam.\");\n+                var full_success_message = interpolate_text(success_message, {\n+                  student_id: unique_student_identifier\n+                });\n+\n+                // Spy on AJAX requests\n+                var requests = AjaxHelpers.requests(this);\n+\n+                studentadmin.$field_entrance_exam_student_select_grade.val(unique_student_identifier)\n+                studentadmin.$btn_skip_entrance_exam.click();\n+                // Verify that the client contacts the server to start instructor task\n+                var url = dashboard_api_url + '/mark_student_can_skip_entrance_exam';\n+                AjaxHelpers.expectRequest(requests, 'POST', url, $.param({\n+                    'unique_student_identifier': unique_student_identifier\n+                }));\n+\n+                // Simulate a success response from the server\n+                AjaxHelpers.respondWithJson(requests, {\n+                    message: full_success_message\n+                });\n+                expect(alert_msg).toEqual(full_success_message);\n+            });\n+\n+            it('shows an error when skip entrance exam fails', function() {\n+                // Spy on AJAX requests\n+                var requests = AjaxHelpers.requests(this);\n+                studentadmin.$field_entrance_exam_student_select_grade.val(unique_student_identifier)\n+                studentadmin.$btn_skip_entrance_exam.click();\n+                // Verify that the client contacts the server to start instructor task\n+                var url = dashboard_api_url + '/mark_student_can_skip_entrance_exam';\n+                debugger;\n+                AjaxHelpers.expectRequest(requests, 'POST', url, $.param({\n+                    'unique_student_identifier': unique_student_identifier\n+                }));\n+\n+                // Simulate an error response from the server\n+                AjaxHelpers.respondWithError(requests, 400,{});\n+\n+                var error_message = gettext(\"An error occurred. Make sure that the student's username or email address is correct and try again.\");","path":"lms/static/js/spec/instructor_dashboard/student_admin_spec.js","position":66,"original_position":66,"commit_id":"71f9a7e5aab466179b0620de4ed7ee4f735dc47e","original_commit_id":"71f9a7e5aab466179b0620de4ed7ee4f735dc47e","user":{"login":"andy-armstrong","id":5985072,"avatar_url":"https://avatars.githubusercontent.com/u/5985072?v=3","gravatar_id":"","url":"https://api.github.com/users/andy-armstrong","html_url":"https://github.com/andy-armstrong","followers_url":"https://api.github.com/users/andy-armstrong/followers","following_url":"https://api.github.com/users/andy-armstrong/following{/other_user}","gists_url":"https://api.github.com/users/andy-armstrong/gists{/gist_id}","starred_url":"https://api.github.com/users/andy-armstrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andy-armstrong/subscriptions","organizations_url":"https://api.github.com/users/andy-armstrong/orgs","repos_url":"https://api.github.com/users/andy-armstrong/repos","events_url":"https://api.github.com/users/andy-armstrong/events{/privacy}","received_events_url":"https://api.github.com/users/andy-armstrong/received_events","type":"User","site_admin":false},"body":"You don't need to use ``gettext`` in Jasmine tests as it is a noop.","created_at":"2015-03-03T18:20:34Z","updated_at":"2015-03-03T18:20:34Z","html_url":"https://github.com/edx/edx-platform/pull/7082#discussion_r25711682","pull_request_url":"https://api.github.com/repos/edx/edx-platform/pulls/7082","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments/25711682"},"html":{"href":"https://github.com/edx/edx-platform/pull/7082#discussion_r25711682"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/7082"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/7082","id":29881403,"html_url":"https://github.com/edx/edx-platform/pull/7082","diff_url":"https://github.com/edx/edx-platform/pull/7082.diff","patch_url":"https://github.com/edx/edx-platform/pull/7082.patch","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/7082","number":7082,"state":"open","locked":false,"title":"Skip entrance exam feature on instructor dashboard","user":{"login":"ziafazal","id":434995,"avatar_url":"https://avatars.githubusercontent.com/u/434995?v=3","gravatar_id":"","url":"https://api.github.com/users/ziafazal","html_url":"https://github.com/ziafazal","followers_url":"https://api.github.com/users/ziafazal/followers","following_url":"https://api.github.com/users/ziafazal/following{/other_user}","gists_url":"https://api.github.com/users/ziafazal/gists{/gist_id}","starred_url":"https://api.github.com/users/ziafazal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ziafazal/subscriptions","organizations_url":"https://api.github.com/users/ziafazal/orgs","repos_url":"https://api.github.com/users/ziafazal/repos","events_url":"https://api.github.com/users/ziafazal/events{/privacy}","received_events_url":"https://api.github.com/users/ziafazal/received_events","type":"User","site_admin":false},"body":"@mattdrayer this is new  PR for skip entrance exam feature after rebase the relevant branch with master. Skip entrance exam feature on instructor dashboard inside \"ENTRANCE EXAM GRADE ADJUSTMENT\" section. It would allow instructor to mark a student to skip entrance exam.","created_at":"2015-02-24T09:21:28Z","updated_at":"2015-03-03T18:20:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f7c9804508d39d790e97895eb5a1787baea4938e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-platform/pulls/7082/commits","review_comments_url":"https://api.github.com/repos/edx/edx-platform/pulls/7082/comments","review_comment_url":"https://api.github.com/repos/edx/edx-platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/edx-platform/issues/7082/comments","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/71f9a7e5aab466179b0620de4ed7ee4f735dc47e","head":{"label":"edx:ziafazal/skip-entrance-exam-am","ref":"ziafazal/skip-entrance-exam-am","sha":"71f9a7e5aab466179b0620de4ed7ee4f735dc47e","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":10391073,"name":"edx-platform","full_name":"edx/edx-platform","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-platform","description":"Open edX, the edX platform that powers http://edx.org","fork":false,"url":"https://api.github.com/repos/edx/edx-platform","forks_url":"https://api.github.com/repos/edx/edx-platform/forks","keys_url":"https://api.github.com/repos/edx/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-platform/teams","hooks_url":"https://api.github.com/repos/edx/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-platform/events","assignees_url":"https://api.github.com/repos/edx/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-platform/tags","blobs_url":"https://api.github.com/repos/edx/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-platform/languages","stargazers_url":"https://api.github.com/repos/edx/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-platform/subscription","commits_url":"https://api.github.com/repos/edx/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-platform/merges","archive_url":"https://api.github.com/repos/edx/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-platform/downloads","issues_url":"https://api.github.com/repos/edx/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-platform/releases{/id}","created_at":"2013-05-30T20:20:38Z","updated_at":"2015-03-03T17:07:26Z","pushed_at":"2015-03-03T18:13:37Z","git_url":"git://github.com/edx/edx-platform.git","ssh_url":"git@github.com:edx/edx-platform.git","clone_url":"https://github.com/edx/edx-platform.git","svn_url":"https://github.com/edx/edx-platform","homepage":"http://openedx.org/","size":1806595,"stargazers_count":1769,"watchers_count":1769,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1012,"mirror_url":null,"open_issues_count":139,"forks":1012,"open_issues":139,"watchers":1769,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"ee0ae6eef9a450e9f6d961afeb369b7b481af846","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":10391073,"name":"edx-platform","full_name":"edx/edx-platform","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-platform","description":"Open edX, the edX platform that powers http://edx.org","fork":false,"url":"https://api.github.com/repos/edx/edx-platform","forks_url":"https://api.github.com/repos/edx/edx-platform/forks","keys_url":"https://api.github.com/repos/edx/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-platform/teams","hooks_url":"https://api.github.com/repos/edx/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-platform/events","assignees_url":"https://api.github.com/repos/edx/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-platform/tags","blobs_url":"https://api.github.com/repos/edx/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-platform/languages","stargazers_url":"https://api.github.com/repos/edx/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-platform/subscription","commits_url":"https://api.github.com/repos/edx/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-platform/merges","archive_url":"https://api.github.com/repos/edx/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-platform/downloads","issues_url":"https://api.github.com/repos/edx/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-platform/releases{/id}","created_at":"2013-05-30T20:20:38Z","updated_at":"2015-03-03T17:07:26Z","pushed_at":"2015-03-03T18:13:37Z","git_url":"git://github.com/edx/edx-platform.git","ssh_url":"git@github.com:edx/edx-platform.git","clone_url":"https://github.com/edx/edx-platform.git","svn_url":"https://github.com/edx/edx-platform","homepage":"http://openedx.org/","size":1806595,"stargazers_count":1769,"watchers_count":1769,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1012,"mirror_url":null,"open_issues_count":139,"forks":1012,"open_issues":139,"watchers":1769,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/7082"},"html":{"href":"https://github.com/edx/edx-platform/pull/7082"},"issue":{"href":"https://api.github.com/repos/edx/edx-platform/issues/7082"},"comments":{"href":"https://api.github.com/repos/edx/edx-platform/issues/7082/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/7082/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/7082/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-platform/statuses/71f9a7e5aab466179b0620de4ed7ee4f735dc47e"}}}}