'Scenario: Uploading a CSV with incorrect data results in error and warnings.
Given that I am on the Membership tab on the Instructor Dashboard
When I select a csv file with incorrect data and click the Upload Button
Then I should be shown an Error Notification
And a corresponding Error Message.
And I should be shown a Warning Notification
And a corresponding Warning Message.'

def test_uploading_csv_file_with_bad_data_results_in_errors_and_warnings(self):

    self.auto_enroll_section.upload_csv_file_with_errors_warnings()
    self.assertTrue(self.auto_enroll_section.is_notification_displayed(section_type=self.auto_enroll_section.NOTIFICATION_ERROR))
    self.assertEqual(self.auto_enroll_section.first_notification_message(section_type=self.auto_enroll_section.NOTIFICATION_ERROR), 'Data    in    row    #2    must    have    exactly    four    columns:    email,    username,    full    name,    and    country')
    self.assertTrue(self.auto_enroll_section.is_notification_displayed(section_type=self.auto_enroll_section.NOTIFICATION_WARNING))
    self.assertEqual(self.auto_enroll_section.first_notification_message(section_type=self.auto_enroll_section.NOTIFICATION_WARNING), 'ename    (d@a.com):    (An    account    with    email    d@a.com    exists    but    the    provided    username    ename    is    different.    Enrolling    anyway    with    d@a.com.)')
