'Scenario: Collapsed subsection stays collapsed after creating a new subsection
Given I have a course with one section and subsection
And I navigate to the course outline page
Then the subsection is collapsed
And when I create a new subsection
Then the first subsection is collapsed
And the second subsection is expanded'

def test_old_subsection_stays_collapsed_after_creation(self):

    self.course_outline_page.visit()
    self.assertTrue(self.course_outline_page.section_at(0).subsection_at(0).is_collapsed)
    self.course_outline_page.section_at(0).add_subsection()
    self.assertTrue(self.course_outline_page.section_at(0).subsection_at(0).is_collapsed)
    self.assertFalse(self.course_outline_page.section_at(0).subsection_at(1).is_collapsed)
