'Scenario: On the Certificates tab of the Instructor Dashboard, Instructor can re-validate certificate.
Given that I am on the certificates tab on the Instructor Dashboard
AND there is a certificate invalidation in certificate invalidation table
When I click "Remove from Invalidation Table" button
Then certificate is re-validated and removed from certificate invalidation table.'

def test_instructor_can_re_validate_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.certificates_section.refresh()
    self.certificates_section.wait_for_certificate_invalidations_section()
    self.certificates_section.remove_first_certificate_invalidation()
    self.assertNotIn(self.student_name, self.certificates_section.last_certificate_invalidation.text)
    self.assertNotIn(notes, self.certificates_section.last_certificate_invalidation.text)
    self.assertIn('The    certificate    for    this    learner    has    been    re-validated    and    the    system    is    re-running    the    grade    for    this    learner.', self.certificates_section.certificate_invalidation_message.text)
