'Scenario: Ensure that Course Number Override is displayed in certificate details view
Given I have a certificate
When I visit certificate details page on studio then course number override should be hidden.
Then I visit the course advance settings page and set the value for course override number.
Then I see Course Number Override next to Course Name in certificate settings page.'

def test_course_number_override_in_certificate_details_view(self):

    self.course_advanced_settings.update({'Course    Number    Display    String': 'Course    Number    Override    String'})
    self.certificates_page.visit()
    certificate = self.create_and_verify_certificate('Course    Title    Override', 0, [self.make_signatory_data('first')])
    self.assertFalse(self.certificates_page.course_number_override().present)
    certificate.wait_for_certificate_delete_button()
    self.assertEqual(len(self.certificates_page.certificates), 1)
    self.advanced_settings_page.visit()
    self.advanced_settings_page.set_values(self.course_advanced_settings)
    self.advanced_settings_page.wait_for_ajax()
    self.certificates_page.visit()
    course_number_override = self.certificates_page.get_course_number_override()
    self.assertEqual(self.course_advanced_settings['Course    Number    Display    String'], course_number_override)
    self.assertTrue(self.certificates_page.course_number_override().present)
