'Scenario: I can grade subsection from course outline page.
Given I visit progress page
And I see that problem in subsection has grading type "Practice"
Then I visit course outline page
And I click on the configuration icon of subsection
And I set grading policy to "Lab"
And I click save button on the modal
Then I visit progress page
And I see that problem in subsection has grading type "Problem"'

def test_subsection_is_graded_in_lms(self):

    progress_page = ProgressPage(self.browser, self.course_id)
    progress_page.visit()
    progress_page.wait_for_page()
    self.assertEqual(u'Practice', progress_page.grading_formats[0])
    self.course_outline_page.visit()
    subsection = self.course_outline_page.section(SECTION_NAME).subsection(SUBSECTION_NAME)
    modal = subsection.edit()
    modal.policy = 'Lab'
    modal.save()
    progress_page.visit()
    self.assertEqual(u'Problem', progress_page.grading_formats[0])
