'Scenario: Collapse link appears after creating first section of a course
Given I have a course with no sections
When I navigate to the course outline page
And I add a section
Then I see the "Collapse All Sections" link
And all sections are expanded'

def test_link_appears_after_section_creation(self):

    self.course_outline_page.visit()
    self.assertEquals(self.course_outline_page.expand_collapse_link_state, ExpandCollapseLinkState.MISSING)
    self.course_outline_page.add_section_from_top_button()
    self.assertEquals(self.course_outline_page.expand_collapse_link_state, ExpandCollapseLinkState.COLLAPSE)
    self.assertFalse(self.course_outline_page.section_at(0).is_collapsed)
