'Given that I am a staff member
When I visit the course outline page in studio.
And open the subsection edit dialog
Then I can view all settings related to Gating
And update those settings to gate a subsection'

def test_subsection_gating_in_studio(self):

    self._setup_prereq()
    self.studio_course_outline.visit()
    self.studio_course_outline.open_subsection_settings_dialog(0)
    self.studio_course_outline.select_advanced_tab(desired_item='gated_content')
    self.assertTrue(self.studio_course_outline.gating_prerequisite_checkbox_is_visible())
    self.assertTrue(self.studio_course_outline.gating_prerequisite_checkbox_is_checked())
    self.assertFalse(self.studio_course_outline.gating_prerequisites_dropdown_is_visible())
    self.assertFalse(self.studio_course_outline.gating_prerequisite_min_score_is_visible())
    self._setup_gated_subsection()
    self.studio_course_outline.visit()
    self.studio_course_outline.open_subsection_settings_dialog(1)
    self.studio_course_outline.select_advanced_tab(desired_item='gated_content')
    self.assertTrue(self.studio_course_outline.gating_prerequisite_checkbox_is_visible())
    self.assertTrue(self.studio_course_outline.gating_prerequisites_dropdown_is_visible())
    self.assertTrue(self.studio_course_outline.gating_prerequisite_min_score_is_visible())
