'Scenario: User cannot clear the course start date
Given I have set course dates
And I press the "Save" notification button
And I clear the course start date
Then I receive a warning about course start date
And I reload the page
And the previously set start date is shown'

def test_cannot_clear_the_course_start_date(self):

    self.set_course_dates()
    self.settings_page.save_changes()
    default_start_date = get_input_value(self.settings_page, self.COURSE_START_DATE_CSS)
    self.settings_page.set_element_values({self.COURSE_START_DATE_CSS: u''})
    error_message_css = u'.message-error'
    self.settings_page.wait_for_element_presence(error_message_css, u'Error    message    is    present')
    self.assertEqual(element_has_text(self.settings_page, error_message_css, u'The    course    must    have    an    assigned    start    date.'), True)
    self.settings_page.refresh_and_wait_for_load()
    self.ensure_input_fields_are_loaded()
    self.assertEqual(get_input_value(self.settings_page, self.COURSE_START_DATE_CSS), default_start_date)
