{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-e2e-tests/pulls/comments/73332056","id":73332056,"diff_hunk":"@@ -0,0 +1,73 @@\n+\"\"\"\n+Test textbook page\n+\"\"\"\n+\n+from bok_choy.web_app_test import WebAppTest\n+\n+from regression.pages.studio.login_studio import StudioLogin\n+from regression.pages.studio.studio_textbooks import TextbookPageExtended\n+from regression.tests.helpers import LoginHelper, get_course_info\n+\n+\n+class TextbookTest(WebAppTest):\n+    \"\"\"\n+    Test textbooks.\n+    \"\"\"\n+    def setUp(self):\n+        super(TextbookTest, self).setUp()\n+        self.login_page = StudioLogin(self.browser)\n+        LoginHelper.login(self.login_page)\n+        self.course_info = get_course_info()\n+\n+        self.textbook_page = TextbookPageExtended(\n+            self.browser,\n+            self.course_info['org'],\n+            self.course_info['number'],\n+            self.course_info['run'])\n+\n+        self.textbook_page.visit()\n+\n+    def test_textbook_edit(self):\n+        \"\"\"\n+        Verifies that textbook can be edited\n+        \"\"\"\n+        # Pre-req\n+        self.textbook_page.open_add_textbook_form()\n+        self.textbook_page.set_input_field_value(\n+            '.edit-textbook #textbook-name-input', 'book_1')\n+        self.textbook_page.set_input_field_value(\n+            '.edit-textbook #chapter1-name', 'chap_1')\n+        self.textbook_page.upload_textbook('test_pdf.pdf')\n+        self.textbook_page.click_textbook_submit_button()\n+        # Edit\n+        self.textbook_page.click_edit_button()\n+        self.textbook_page.set_input_field_value(\n+            '.edit-textbook #textbook-name-input', 'edit')\n+        self.textbook_page.set_input_field_value(\n+            '.edit-textbook #chapter1-name', 'edit')\n+        self.textbook_page.click_textbook_submit_button()\n+        self.assertEquals(self.textbook_page.get_element_text(\n+            '.textbook-title'), 'book_1edit')\n+        # Delete\n+        self.textbook_page.click_delete_button()\n+        message = self.textbook_page.get_element_text(","path":"regression/tests/studio/test_studio_textbooks.py","position":53,"original_position":53,"commit_id":"6b57371d1ec676a337038446e068a36db58394aa","original_commit_id":"6b57371d1ec676a337038446e068a36db58394aa","user":{"login":"Muddasser","id":4279899,"avatar_url":"https://avatars.githubusercontent.com/u/4279899?v=3","gravatar_id":"","url":"https://api.github.com/users/Muddasser","html_url":"https://github.com/Muddasser","followers_url":"https://api.github.com/users/Muddasser/followers","following_url":"https://api.github.com/users/Muddasser/following{/other_user}","gists_url":"https://api.github.com/users/Muddasser/gists{/gist_id}","starred_url":"https://api.github.com/users/Muddasser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Muddasser/subscriptions","organizations_url":"https://api.github.com/users/Muddasser/orgs","repos_url":"https://api.github.com/users/Muddasser/repos","events_url":"https://api.github.com/users/Muddasser/events{/privacy}","received_events_url":"https://api.github.com/users/Muddasser/received_events","type":"User","site_admin":false},"body":"@raeeschachar This function seems very generic. Can we move it to utils? Or is there any existing function for it?","created_at":"2016-08-03T12:48:55Z","updated_at":"2016-08-03T12:48:55Z","html_url":"https://github.com/edx/edx-e2e-tests/pull/69#discussion_r73332056","pull_request_url":"https://api.github.com/repos/edx/edx-e2e-tests/pulls/69","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-e2e-tests/pulls/comments/73332056"},"html":{"href":"https://github.com/edx/edx-e2e-tests/pull/69#discussion_r73332056"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-e2e-tests/pulls/69"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-e2e-tests/pulls/69","id":79362652,"html_url":"https://github.com/edx/edx-e2e-tests/pull/69","diff_url":"https://github.com/edx/edx-e2e-tests/pull/69.diff","patch_url":"https://github.com/edx/edx-e2e-tests/pull/69.patch","issue_url":"https://api.github.com/repos/edx/edx-e2e-tests/issues/69","number":69,"state":"open","locked":false,"title":"Added some of studio grading page tests","user":{"login":"raeeschachar","id":6028681,"avatar_url":"https://avatars.githubusercontent.com/u/6028681?v=3","gravatar_id":"","url":"https://api.github.com/users/raeeschachar","html_url":"https://github.com/raeeschachar","followers_url":"https://api.github.com/users/raeeschachar/followers","following_url":"https://api.github.com/users/raeeschachar/following{/other_user}","gists_url":"https://api.github.com/users/raeeschachar/gists{/gist_id}","starred_url":"https://api.github.com/users/raeeschachar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raeeschachar/subscriptions","organizations_url":"https://api.github.com/users/raeeschachar/orgs","repos_url":"https://api.github.com/users/raeeschachar/repos","events_url":"https://api.github.com/users/raeeschachar/events{/privacy}","received_events_url":"https://api.github.com/users/raeeschachar/received_events","type":"User","site_admin":false},"body":"@benpatterson @Muddasser \r\nPlease review. \r\nSending part of Studio grading tests so that reviewing is easier. The failing pylint violations will be fixed in the next push.","created_at":"2016-07-29T13:51:23Z","updated_at":"2016-08-03T12:48:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d59c04d1f5850808b30cb3a2b48ebcda11a0f8f5","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-e2e-tests/pulls/69/commits","review_comments_url":"https://api.github.com/repos/edx/edx-e2e-tests/pulls/69/comments","review_comment_url":"https://api.github.com/repos/edx/edx-e2e-tests/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/edx-e2e-tests/issues/69/comments","statuses_url":"https://api.github.com/repos/edx/edx-e2e-tests/statuses/6b57371d1ec676a337038446e068a36db58394aa","head":{"label":"edx:raees/e2e-bokchoy-studio-grading-tests","ref":"raees/e2e-bokchoy-studio-grading-tests","sha":"6b57371d1ec676a337038446e068a36db58394aa","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":13808625,"name":"edx-e2e-tests","full_name":"edx/edx-e2e-tests","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-e2e-tests","description":"End-to-end tests for edx applications","fork":false,"url":"https://api.github.com/repos/edx/edx-e2e-tests","forks_url":"https://api.github.com/repos/edx/edx-e2e-tests/forks","keys_url":"https://api.github.com/repos/edx/edx-e2e-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-e2e-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-e2e-tests/teams","hooks_url":"https://api.github.com/repos/edx/edx-e2e-tests/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-e2e-tests/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-e2e-tests/events","assignees_url":"https://api.github.com/repos/edx/edx-e2e-tests/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-e2e-tests/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-e2e-tests/tags","blobs_url":"https://api.github.com/repos/edx/edx-e2e-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-e2e-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-e2e-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-e2e-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-e2e-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-e2e-tests/languages","stargazers_url":"https://api.github.com/repos/edx/edx-e2e-tests/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-e2e-tests/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-e2e-tests/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-e2e-tests/subscription","commits_url":"https://api.github.com/repos/edx/edx-e2e-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-e2e-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-e2e-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-e2e-tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-e2e-tests/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-e2e-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-e2e-tests/merges","archive_url":"https://api.github.com/repos/edx/edx-e2e-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-e2e-tests/downloads","issues_url":"https://api.github.com/repos/edx/edx-e2e-tests/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-e2e-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-e2e-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-e2e-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-e2e-tests/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-e2e-tests/releases{/id}","deployments_url":"https://api.github.com/repos/edx/edx-e2e-tests/deployments","created_at":"2013-10-23T16:45:07Z","updated_at":"2016-06-24T17:39:20Z","pushed_at":"2016-08-03T11:53:54Z","git_url":"git://github.com/edx/edx-e2e-tests.git","ssh_url":"git@github.com:edx/edx-e2e-tests.git","clone_url":"https://github.com/edx/edx-e2e-tests.git","svn_url":"https://github.com/edx/edx-e2e-tests","homepage":null,"size":11065,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":1,"forks":7,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"1788268e5e0a5e0a616744f4a5bee7bd565a5855","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":13808625,"name":"edx-e2e-tests","full_name":"edx/edx-e2e-tests","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-e2e-tests","description":"End-to-end tests for edx applications","fork":false,"url":"https://api.github.com/repos/edx/edx-e2e-tests","forks_url":"https://api.github.com/repos/edx/edx-e2e-tests/forks","keys_url":"https://api.github.com/repos/edx/edx-e2e-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-e2e-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-e2e-tests/teams","hooks_url":"https://api.github.com/repos/edx/edx-e2e-tests/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-e2e-tests/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-e2e-tests/events","assignees_url":"https://api.github.com/repos/edx/edx-e2e-tests/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-e2e-tests/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-e2e-tests/tags","blobs_url":"https://api.github.com/repos/edx/edx-e2e-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-e2e-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-e2e-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-e2e-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-e2e-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-e2e-tests/languages","stargazers_url":"https://api.github.com/repos/edx/edx-e2e-tests/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-e2e-tests/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-e2e-tests/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-e2e-tests/subscription","commits_url":"https://api.github.com/repos/edx/edx-e2e-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-e2e-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-e2e-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-e2e-tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-e2e-tests/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-e2e-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-e2e-tests/merges","archive_url":"https://api.github.com/repos/edx/edx-e2e-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-e2e-tests/downloads","issues_url":"https://api.github.com/repos/edx/edx-e2e-tests/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-e2e-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-e2e-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-e2e-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-e2e-tests/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-e2e-tests/releases{/id}","deployments_url":"https://api.github.com/repos/edx/edx-e2e-tests/deployments","created_at":"2013-10-23T16:45:07Z","updated_at":"2016-06-24T17:39:20Z","pushed_at":"2016-08-03T11:53:54Z","git_url":"git://github.com/edx/edx-e2e-tests.git","ssh_url":"git@github.com:edx/edx-e2e-tests.git","clone_url":"https://github.com/edx/edx-e2e-tests.git","svn_url":"https://github.com/edx/edx-e2e-tests","homepage":null,"size":11065,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":1,"forks":7,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-e2e-tests/pulls/69"},"html":{"href":"https://github.com/edx/edx-e2e-tests/pull/69"},"issue":{"href":"https://api.github.com/repos/edx/edx-e2e-tests/issues/69"},"comments":{"href":"https://api.github.com/repos/edx/edx-e2e-tests/issues/69/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-e2e-tests/pulls/69/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/edx-e2e-tests/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/edx-e2e-tests/pulls/69/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-e2e-tests/statuses/6b57371d1ec676a337038446e068a36db58394aa"}}}}
{"actor":{"display_login":"Muddasser"}}