Commit d7bc32f5 by Matt Drayer

Merge pull request #11071 from edx/asadiqbal08/SOL-1358

asadiqbal08/SOL-1538 Incorrect Course Number Override appears on certificate setup page
parents bd1052cb 624b2ba4
...@@ -85,7 +85,7 @@ from openedx.core.lib.js_utils import ( ...@@ -85,7 +85,7 @@ from openedx.core.lib.js_utils import (
url_name: "${context_course.location.name | h}", url_name: "${context_course.location.name | h}",
org: "${context_course.location.org | h}", org: "${context_course.location.org | h}",
num: "${context_course.location.course | h}", num: "${context_course.location.course | h}",
display_course_number: "${_(context_course.display_number_with_default)}", display_course_number: "${_(context_course.display_coursenumber)}",
revision: "${context_course.location.revision | h}", revision: "${context_course.location.revision | h}",
self_paced: ${escape_json_dumps(context_course.self_paced) | n} self_paced: ${escape_json_dumps(context_course.self_paced) | n}
}); });
......
...@@ -68,6 +68,12 @@ class CertificatesPage(CoursePage): ...@@ -68,6 +68,12 @@ class CertificatesPage(CoursePage):
""" """
return self.q(css='.course-number-override .certificate-value').first.text[0] return self.q(css='.course-number-override .certificate-value').first.text[0]
def course_number_override(self):
"""
Return Course Number Override selector
"""
return self.q(css='.course-number-override')
################ ################
# Properties # Properties
################ ################
......
...@@ -274,8 +274,9 @@ class CertificatesTest(StudioCourseTest): ...@@ -274,8 +274,9 @@ class CertificatesTest(StudioCourseTest):
Scenario: Ensure that Course Number Override is displayed in certificate details view Scenario: Ensure that Course Number Override is displayed in certificate details view
Given I have a certificate Given I have a certificate
When I visit certificate details page on studio When I visit certificate details page on studio then course number override should be hidden.
Then I see Course Number Override next to Course Name 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.
""" """
self.course_advanced_settings.update( self.course_advanced_settings.update(
...@@ -288,7 +289,7 @@ class CertificatesTest(StudioCourseTest): ...@@ -288,7 +289,7 @@ class CertificatesTest(StudioCourseTest):
0, 0,
[self.make_signatory_data('first')] [self.make_signatory_data('first')]
) )
self.assertFalse(self.certificates_page.course_number_override().present)
certificate.wait_for_certificate_delete_button() certificate.wait_for_certificate_delete_button()
# Make sure certificate is created # Make sure certificate is created
...@@ -302,3 +303,4 @@ class CertificatesTest(StudioCourseTest): ...@@ -302,3 +303,4 @@ class CertificatesTest(StudioCourseTest):
self.certificates_page.visit() self.certificates_page.visit()
course_number_override = self.certificates_page.get_course_number_override() course_number_override = self.certificates_page.get_course_number_override()
self.assertEqual(self.course_advanced_settings['Course Number Display String'], 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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment