'Scenario: User can clear previously set course dates (except start date)
Given I have set course dates
And I clear all the dates except start
And I press the "Save" notification button
And I reload the page
Then I see cleared dates'

def test_clear_previously_set_course_dates(self):

    self.set_course_dates()
    values_to_set = {self.COURSE_END_DATE_CSS: u'', self.ENROLLMENT_START_DATE_CSS: u'', self.ENROLLMENT_END_DATE_CSS: u''}
    self.settings_page.set_element_values(values_to_set)
    self.settings_page.save_changes()
    self.settings_page.refresh_and_wait_for_load()
    self.ensure_input_fields_are_loaded()
    css_selectors = [self.COURSE_START_DATE_CSS, self.COURSE_END_DATE_CSS, self.ENROLLMENT_START_DATE_CSS, self.ENROLLMENT_END_DATE_CSS]
    expected_values = [self.course_start_date, u'', u'', u'']
    self.assertEqual([get_input_value(self.settings_page, css_selector) for css_selector in css_selectors], expected_values)
