'If enrollment tracks are the division scheme, verifies that discussion visibility labels
correctly render.
Note that there are similar tests for cohorts in test_cohorts.py.'

def test_enrollment_track_discussion_visibility_label(self):

    def refresh_thread_page():
        self.browser.refresh()
        self.thread_page.wait_for_page()
    AutoAuthPage(self.browser, course_id=self.course_id, roles='Moderator', staff=True).visit()
    self.add_modes_and_view_discussion_mgmt_page(['audit', 'verified'])
    self.discussion_management_page.select_division_scheme(self.discussion_management_page.ENROLLMENT_TRACK_SCHEME)
    self.verify_save_confirmation_message(self.scheme_key)
    self.enable_always_divide_inline_discussions(self.course_fixture)
    self.setup_thread(1, group_id=(-1))
    refresh_thread_page()
    self.assertEquals(self.thread_page.get_group_visibility_label(), 'This    post    is    visible    only    to    {}.'.format('Audit'))
    self.view_discussion_management_page()
    self.discussion_management_page.select_division_scheme(self.discussion_management_page.NOT_DIVIDED_SCHEME)
    self.verify_save_confirmation_message(self.scheme_key)
    self.thread_page.visit()
    self.assertEquals(self.thread_page.get_group_visibility_label(), 'This    post    is    visible    to    everyone.')
