'Scenario: Create new unit
Given that I have created a section
And that I have created a subsection within that section
When I click the "+ Add unit" button in that subsection
Then I am redirected to a New Unit page
And the display name is in its editable form.'

def test_create_new_unit(self):

    self.course_outline_page.visit()
    self.course_outline_page.add_section_from_top_button()
    self.assertEqual(len(self.course_outline_page.sections()), 1)
    self.course_outline_page.section_at(0).add_subsection()
    self.assertEqual(len(self.course_outline_page.section_at(0).subsections()), 1)
    self.course_outline_page.section_at(0).subsection_at(0).add_unit()
    unit_page = ContainerPage(self.browser, None)
    unit_page.wait_for_page()
    self.assertTrue(unit_page.is_inline_editing_display_name())
