'Scenario: Cohort Enable/Disable checkbox related functionality is working as intended.
Given I have a cohorted course with a user.
And I can see the `Enable Cohorts` checkbox is checked.
And cohort management controls are visible.
When I uncheck the `Enable Cohorts` checkbox.
Then cohort management controls are not visible.
And When I reload the page.
Then I can see the `Enable Cohorts` checkbox is unchecked.
And cohort management controls are not visible.'

def test_cohort_enable_disable(self):

    self.assertTrue(self.cohort_management_page.is_cohorted)
    self.assertTrue(self.cohort_management_page.cohort_management_controls_visible())
    self.cohort_management_page.is_cohorted = False
    self.assertFalse(self.cohort_management_page.cohort_management_controls_visible())
    self.browser.refresh()
    self.cohort_management_page.wait_for_page()
    self.assertFalse(self.cohort_management_page.is_cohorted)
    self.assertFalse(self.cohort_management_page.cohort_management_controls_visible())
