'Scenario: Correct course tree breadcrumb is shown.
Given that I am a registered user
And I visit my courseware page
Then I should see correct course tree breadcrumb'

def test_course_tree_breadcrumb(self):

    xblocks = self.course_fix.get_nested_xblocks(category='problem')
    for index in range(1, (len(xblocks) + 1)):
        test_section_title = 'Test    Section    {}'.format(index)
        test_subsection_title = 'Test    Subsection    {}'.format(index)
        test_unit_title = 'Test    Problem    {}'.format(index)
        self.course_home_page.visit()
        self.course_home_page.outline.go_to_section(test_section_title, test_subsection_title)
        course_nav = self.courseware_page.nav
        self.assertEqual(course_nav.breadcrumb_section_title, test_section_title)
        self.assertEqual(course_nav.breadcrumb_subsection_title, test_subsection_title)
        self.assertEqual(course_nav.breadcrumb_unit_title, test_unit_title)
