'Scenario: On the Certificates tab of the Instructor Dashboard, Instructor should see error message if he clicks
"Invalidate Certificate" button without entering student username or email.
Given that I am on the certificates tab on the Instructor Dashboard
When I click "Invalidate Certificate" button without entering student username/email.
Then I see following error message
"Student username/email field is required and can not be empty."
"Kindly fill in username/email and then press "Invalidate Certificate" button."'

def test_error_on_empty_user_name_or_email(self):

    self.certificates_section.fill_certificate_invalidation_user_name_field('')
    self.certificates_section.click_invalidate_certificate_button()
    self.certificates_section.wait_for_ajax()
    self.assertIn(u'Student    username/email    field    is    required    and    can    not    be    empty.    Kindly    fill    in    username/email    and    then    press    "Invalidate    Certificate"    button.', self.certificates_section.certificate_invalidation_message.text)
