'Scenario: On the Certificates tab of the Instructor Dashboard, Instructor can add a certificate
invalidation to invalidation list.
Given that I am on the Certificates tab on the Instructor Dashboard
When I fill in student username and notes fields and click \'Add Exception\' button
Then new certificate exception should be visible in certificate exceptions list'

def test_instructor_can_invalidate_certificate(self):

    notes = 'Test    Notes'
    self.certificates_section.add_certificate_invalidation(self.student_name, notes)
    self.assertIn(self.student_name, self.certificates_section.last_certificate_invalidation.text)
    self.assertIn(notes, self.certificates_section.last_certificate_invalidation.text)
    self.assertIn('Certificate    has    been    successfully    invalidated    for    {user}.'.format(user=self.student_name), self.certificates_section.certificate_invalidation_message.text)
    self.certificates_section.refresh()
    self.certificates_section.wait_for_certificate_invalidations_section()
    self.assertIn(self.student_name, self.certificates_section.last_certificate_invalidation.text)
    self.assertIn(notes, self.certificates_section.last_certificate_invalidation.text)
