'Scenario: Ensure that the user can delete certificate.
Given I have a course with 1 certificate
And I go to the Certificates page
When I delete the Certificate with name "New Certificate"
Then I see that there is no certificate
When I refresh the page
Then I see that the certificate has been deleted'

def test_can_delete_certificate(self):

    self.certificates_page.visit()
    certificate = self.create_and_verify_certificate('Course    Title    Override', 0, [self.make_signatory_data('first'), self.make_signatory_data('second')])
    certificate.wait_for_certificate_delete_button()
    self.assertEqual(len(self.certificates_page.certificates), 1)
    certificate.click_delete_certificate_button()
    self.certificates_page.click_confirmation_prompt_primary_button()
    self.certificates_page.visit()
    self.assertEqual(len(self.certificates_page.certificates), 0)
