{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/comments/120383982","pull_request_review_id":42341324,"id":120383982,"diff_hunk":"@@ -357,11 +357,72 @@ def test_not_divided_hides_discussion_topics(self):\n \n     def test_disabling_cohorts(self):\n         \"\"\"\n-        Test that disabling cohorts hides the cohort division scheme iff it is not the selected scheme\n+        Test that the discussions management tab hides when there is <= 1 enrollment track, the Cohort division scheme\n+         is not selected, and cohorts are disabled.\n         (even without reloading the page).\n         \"\"\"\n-        # TODO: will be added as part of AJ's work.\n-        pass\n+        self.disable_cohorting(self.course_fixture)\n+        self.instructor_dashboard_page.visit()\n+        self.assertFalse(self.instructor_dashboard_page.is_discussion_management_visible())\n+\n+    def test_disabling_cohorts_while_selected(self):\n+        \"\"\"\n+        Test that disabling cohorts does not hide the discussion tab when there is more than one enrollment track.\n+        Also that the division scheme for cohorts is visible iff it was selected.\n+        (even without reloading the page).\n+        \"\"\"\n+        add_enrollment_course_modes(self.browser, self.course_id, ['audit', 'verified'])\n+\n+        # Verify that the tab is visible\n+        self.instructor_dashboard_page.visit()\n+        self.assertTrue(self.instructor_dashboard_page.is_discussion_management_visible())\n+        self.view_discussion_management_page()\n+        self.discussion_management_page.select_division_scheme(self.discussion_management_page.COHORT_SCHEME)\n+        self.disable_cohorting(self.course_fixture)\n+        self.assertTrue(self.instructor_dashboard_page.is_discussion_management_visible())\n+\n+        # Go to Discussions tab and ensure that the correct scheme options are visible\n+        self.view_discussion_management_page()\n+        self.assertTrue(\n+            self.discussion_management_page.division_scheme_visible(\n+                self.discussion_management_page.ENROLLMENT_TRACK_SCHEME\n+            )\n+        )\n+        self.assertTrue(\n+            self.discussion_management_page.division_scheme_visible(\n+                self.discussion_management_page.COHORT_SCHEME\n+            )\n+        )\n+\n+    def test_disabling_cohorts_while_not_selected(self):\n+        \"\"\"\n+        Test that disabling cohorts does not hide the discussion tab when there is more than one enrollment track.\n+        Also that the division scheme for cohorts is not visible when cohorts are disabled and another scheme is\n+        selected for division.\n+        (even without reloading the page).\n+        \"\"\"\n+        add_enrollment_course_modes(self.browser, self.course_id, ['audit', 'verified'])\n+\n+        # Verify that the tab is visible\n+        self.instructor_dashboard_page.visit()\n+        self.assertTrue(self.instructor_dashboard_page.is_discussion_management_visible())\n+        self.view_discussion_management_page()\n+        self.discussion_management_page.select_division_scheme(self.discussion_management_page.ENROLLMENT_TRACK_SCHEME)\n+        self.disable_cohorting(self.course_fixture)\n+        self.assertTrue(self.instructor_dashboard_page.is_discussion_management_visible())\n+\n+        # Go to Discussions tab and ensure that the correct scheme options are visible\n+        self.view_discussion_management_page()\n+        self.assertTrue(","path":"common/test/acceptance/tests/discussion/test_discussion_management.py","position":33,"original_position":63,"commit_id":"64fc2824a21bf97203d7ca40521e3d0848d8cedb","original_commit_id":"64fc2824a21bf97203d7ca40521e3d0848d8cedb","user":{"login":"cahrens","id":484484,"avatar_url":"https://avatars2.githubusercontent.com/u/484484?v=3","gravatar_id":"","url":"https://api.github.com/users/cahrens","html_url":"https://github.com/cahrens","followers_url":"https://api.github.com/users/cahrens/followers","following_url":"https://api.github.com/users/cahrens/following{/other_user}","gists_url":"https://api.github.com/users/cahrens/gists{/gist_id}","starred_url":"https://api.github.com/users/cahrens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cahrens/subscriptions","organizations_url":"https://api.github.com/users/cahrens/orgs","repos_url":"https://api.github.com/users/cahrens/repos","events_url":"https://api.github.com/users/cahrens/events{/privacy}","received_events_url":"https://api.github.com/users/cahrens/received_events","type":"User","site_admin":false},"body":"Again, no need to check the enrollment radio button.","created_at":"2017-06-06T14:52:42Z","updated_at":"2017-06-06T14:52:42Z","html_url":"https://github.com/edx/edx-platform/pull/15227#discussion_r120383982","pull_request_url":"https://api.github.com/repos/edx/edx-platform/pulls/15227","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments/120383982"},"html":{"href":"https://github.com/edx/edx-platform/pull/15227#discussion_r120383982"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/15227"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/15227","id":123499289,"html_url":"https://github.com/edx/edx-platform/pull/15227","diff_url":"https://github.com/edx/edx-platform/pull/15227.diff","patch_url":"https://github.com/edx/edx-platform/pull/15227.patch","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/15227","number":15227,"state":"open","locked":false,"title":"Staubina/educator 144","user":{"login":"staubina","id":2854941,"avatar_url":"https://avatars1.githubusercontent.com/u/2854941?v=3","gravatar_id":"","url":"https://api.github.com/users/staubina","html_url":"https://github.com/staubina","followers_url":"https://api.github.com/users/staubina/followers","following_url":"https://api.github.com/users/staubina/following{/other_user}","gists_url":"https://api.github.com/users/staubina/gists{/gist_id}","starred_url":"https://api.github.com/users/staubina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/staubina/subscriptions","organizations_url":"https://api.github.com/users/staubina/orgs","repos_url":"https://api.github.com/users/staubina/repos","events_url":"https://api.github.com/users/staubina/events{/privacy}","received_events_url":"https://api.github.com/users/staubina/received_events","type":"User","site_admin":false},"body":"## [EDUCATOR-144](https://openedx.atlassian.net/browse/EDUCATOR-144)\r\n\r\n### Description\r\n\r\nUpdated the discussion management tab to hide when appropriate.\r\n\r\n### Sandbox\r\n- [x] If helpful for review, build a sandbox for your branch and add a link here\r\nhttps://staubina-ed144.sandbox.edx.org/dashboard\r\n\r\n### Testing\r\n- [x] Unit, integration, acceptance tests as appropriate\r\n- [x] safecommit violation code review process\r\n\r\nFront-end changes:\r\n- [x] i18n\r\n- [x] RTL\r\n\r\n### Reviewers\r\n- [x] Assign reviewers to your PR based on the changes it contains (Dev, Doc, UX, Accessibility, Product, DevOps)\r\n\r\n### Post-review\r\n- [ ] Rebase and squash commits","created_at":"2017-06-01T13:29:58Z","updated_at":"2017-06-06T14:52:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"18b6fb894568ae09cf2fb542c4e43fc903ee0b99","assignee":{"login":"staubina","id":2854941,"avatar_url":"https://avatars1.githubusercontent.com/u/2854941?v=3","gravatar_id":"","url":"https://api.github.com/users/staubina","html_url":"https://github.com/staubina","followers_url":"https://api.github.com/users/staubina/followers","following_url":"https://api.github.com/users/staubina/following{/other_user}","gists_url":"https://api.github.com/users/staubina/gists{/gist_id}","starred_url":"https://api.github.com/users/staubina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/staubina/subscriptions","organizations_url":"https://api.github.com/users/staubina/orgs","repos_url":"https://api.github.com/users/staubina/repos","events_url":"https://api.github.com/users/staubina/events{/privacy}","received_events_url":"https://api.github.com/users/staubina/received_events","type":"User","site_admin":false},"assignees":[{"login":"staubina","id":2854941,"avatar_url":"https://avatars1.githubusercontent.com/u/2854941?v=3","gravatar_id":"","url":"https://api.github.com/users/staubina","html_url":"https://github.com/staubina","followers_url":"https://api.github.com/users/staubina/followers","following_url":"https://api.github.com/users/staubina/following{/other_user}","gists_url":"https://api.github.com/users/staubina/gists{/gist_id}","starred_url":"https://api.github.com/users/staubina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/staubina/subscriptions","organizations_url":"https://api.github.com/users/staubina/orgs","repos_url":"https://api.github.com/users/staubina/repos","events_url":"https://api.github.com/users/staubina/events{/privacy}","received_events_url":"https://api.github.com/users/staubina/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-platform/pulls/15227/commits","review_comments_url":"https://api.github.com/repos/edx/edx-platform/pulls/15227/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/15227/comments","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/64fc2824a21bf97203d7ca40521e3d0848d8cedb","head":{"label":"edx:staubina/EDUCATOR-144","ref":"staubina/EDUCATOR-144","sha":"64fc2824a21bf97203d7ca40521e3d0848d8cedb","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars0.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://avatars0.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":"The Open edX platform, the software that powers edX!","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}","deployments_url":"https://api.github.com/repos/edx/edx-platform/deployments","created_at":"2013-05-30T20:20:38Z","updated_at":"2017-06-05T13:53:07Z","pushed_at":"2017-06-06T14:33:07Z","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://open.edx.org/","size":816191,"stargazers_count":3157,"watchers_count":3157,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1834,"mirror_url":null,"open_issues_count":184,"forks":1834,"open_issues":184,"watchers":3157,"default_branch":"master"}},"base":{"label":"edx:christina/ed11-simplification","ref":"christina/ed11-simplification","sha":"3abc7dc07e05d27fc15bcdcd0d4fcdc7f23e9476","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars0.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://avatars0.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":"The Open edX platform, the software that powers edX!","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}","deployments_url":"https://api.github.com/repos/edx/edx-platform/deployments","created_at":"2013-05-30T20:20:38Z","updated_at":"2017-06-05T13:53:07Z","pushed_at":"2017-06-06T14:33:07Z","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://open.edx.org/","size":816191,"stargazers_count":3157,"watchers_count":3157,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1834,"mirror_url":null,"open_issues_count":184,"forks":1834,"open_issues":184,"watchers":3157,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/15227"},"html":{"href":"https://github.com/edx/edx-platform/pull/15227"},"issue":{"href":"https://api.github.com/repos/edx/edx-platform/issues/15227"},"comments":{"href":"https://api.github.com/repos/edx/edx-platform/issues/15227/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/15227/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/15227/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-platform/statuses/64fc2824a21bf97203d7ca40521e3d0848d8cedb"}}}}
{"actor":{"display_login":"cahrens"}}