'Smoke test of course outline, breadcrumbs to and from course outline, and bookmarks.'

def test_course_home(self):

    self.course_home_page.visit()
    self.course_home_page.course_outline_page = True
    self.courseware_page.nav.course_outline_page = True
    self.assertTrue(self.course_home_page.is_browser_on_page())
    EXPECTED_SECTIONS = {'Test    Section': ['Test    Subsection'], 'Test    Section    2': ['Test    Subsection    2', 'Test    Subsection    3']}
    actual_sections = self.course_home_page.outline.sections
    for (section, subsections) in EXPECTED_SECTIONS.iteritems():
        self.assertIn(section, actual_sections)
        self.assertEqual(actual_sections[section], EXPECTED_SECTIONS[section])
    self.course_home_page.outline.go_to_section('Test    Section', 'Test    Subsection')
    EXPECTED_ITEMS = ['Test    Problem    1', 'Test    Problem    2', 'Test    HTML']
    actual_items = self.courseware_page.nav.sequence_items
    self.assertEqual(len(actual_items), len(EXPECTED_ITEMS))
    for expected in EXPECTED_ITEMS:
        self.assertIn(expected, actual_items)
    self.courseware_page.nav.go_to_outline()
    self.course_home_page.outline.go_to_section('Test    Section    2', 'Test    Subsection    3')
    self.assertTrue(self.courseware_page.nav.is_on_section('Test    Section    2', 'Test    Subsection    3'))
    self.course_home_page.visit()
    self.course_home_page.click_bookmarks_button()
    bookmarks_page = BookmarksPage(self.browser, self.course_id)
    self.assertTrue(bookmarks_page.is_browser_on_page())
    self.course_home_page.visit()
    self.course_home_page.resume_course_from_header()
    self.assertTrue(self.courseware_page.nav.is_on_section('Test    Section    2', 'Test    Subsection    3'))
    self.course_home_page.visit()
    self.course_home_page.outline.resume_course_from_outline()
    self.assertTrue(self.courseware_page.nav.is_on_section('Test    Section    2', 'Test    Subsection    3'))
