'Scenario: Ensure that the certificates can be created and edited correctly.
Given I have a course without certificates
When I click button \'Add your first Certificate\'
And I set new the course title override and signatory and click the button \'Create\'
Then I see the new certificate is added and has correct data
When I edit the  certificate
And I change the name and click the button \'Save\'
Then I see the certificate is saved successfully and has the new name'

def test_can_create_and_edit_certficate(self):

    self.certificates_page.visit()
    self.certificates_page.wait_for_first_certificate_button()
    certificate = self.create_and_verify_certificate('Course    Title    Override', 0, [self.make_signatory_data('first'), self.make_signatory_data('second')])
    certificate.click_edit_certificate_button()
    certificate.course_title = 'Updated    Course    Title    Override    2'
    self.assertEqual(certificate.get_text('.action-primary'), 'Save')
    certificate.click_save_certificate_button()
    self.assertIn('Updated    Course    Title    Override    2', certificate.course_title)
