'Scenario: A locked section is not visible to students in the LMS
Given I have a course with two sections
When I enable explicit staff lock on one section
And I click the View Live button to switch to staff view
And I visit the course home with the outline
Then I see two sections in the outline
And when I switch the view mode to student view
Then I see one section in the outline'

def test_locked_sections_do_not_appear_in_lms(self):

    self.course_outline_page.visit()
    self.course_outline_page.add_section_from_top_button()
    self.course_outline_page.section_at(1).set_staff_lock(True)
    self.course_outline_page.view_live()
    course_home_page = CourseHomePage(self.browser, self.course_id)
    course_home_page.visit()
    self.assertEqual(course_home_page.outline.num_sections, 2)
    course_home_page.preview.set_staff_view_mode('Learner')
    self.assertEqual(course_home_page.outline.num_sections, 1)
