diff --git a/cms/static/js/certificates/views/certificates_list.js b/cms/static/js/certificates/views/certificates_list.js index 32832b806e..c6871ac00f 100644 --- a/cms/static/js/certificates/views/certificates_list.js +++ b/cms/static/js/certificates/views/certificates_list.js @@ -15,6 +15,8 @@ function (gettext, ListView, CertificateItemView) { // Translators: this refers to a collection of certificates. itemCategoryDisplayName: gettext('certificate'), + newItemMessage: gettext('Set up your certificate'), + // Translators: This line refers to the initial state of the form when no data has been inserted emptyMessage: gettext('You have not created any certificates yet.'), diff --git a/cms/static/js/views/content_group_list.js b/cms/static/js/views/content_group_list.js index d4b6242e18..8f5e420a96 100644 --- a/cms/static/js/views/content_group_list.js +++ b/cms/static/js/views/content_group_list.js @@ -15,6 +15,8 @@ define([ // Translators: This refers to a content group that can be linked to a student cohort. itemCategoryDisplayName: gettext('content group'), + newItemMessage: gettext('Add your first content group'), + emptyMessage: gettext('You have not created any content groups yet.'), createItemView: function(options) { diff --git a/cms/static/js/views/group_configurations_list.js b/cms/static/js/views/group_configurations_list.js index e40af573e9..a1996430c4 100644 --- a/cms/static/js/views/group_configurations_list.js +++ b/cms/static/js/views/group_configurations_list.js @@ -17,6 +17,8 @@ define([ // Translators: this refers to a collection of groups. itemCategoryDisplayName: gettext('group configuration'), + newItemMessage: gettext('Add your first group configuration'), + emptyMessage: gettext('You have not created any group configurations yet.'), createItemView: function(options) { diff --git a/cms/static/js/views/list.js b/cms/static/js/views/list.js index e3c0cddd07..e7bbc5e19d 100644 --- a/cms/static/js/views/list.js +++ b/cms/static/js/views/list.js @@ -38,6 +38,7 @@ define([ render: function(model) { this.$el.html(this.template({ itemCategoryDisplayName: this.itemCategoryDisplayName, + newItemMessage: this.newItemMessage, emptyMessage: this.emptyMessage, length: this.collection.length, isEditing: model && model.get('editing'), diff --git a/cms/templates/js/list.underscore b/cms/templates/js/list.underscore index 409c4eabb6..c1314e0930 100644 --- a/cms/templates/js/list.underscore +++ b/cms/templates/js/list.underscore @@ -4,7 +4,7 @@ <%- emptyMessage %> <%= interpolate( - gettext("Add your first %(item_type)s"), {item_type: itemCategoryDisplayName}, true + gettext("%(new_item_message)s"), {new_item_message: newItemMessage}, true ) %>

diff --git a/common/test/acceptance/pages/studio/settings_certificates.py b/common/test/acceptance/pages/studio/settings_certificates.py index 8cec6c7ac3..adce19fd69 100644 --- a/common/test/acceptance/pages/studio/settings_certificates.py +++ b/common/test/acceptance/pages/studio/settings_certificates.py @@ -83,6 +83,13 @@ class CertificatesPage(CoursePage): """ return self.q(css='.wrapper-content ' + self.certficate_css + ' .no-content').text[0] + @property + def new_certificate_link_text(self): + """ + Returns text of new-button link . + """ + return self.q(css='.wrapper-content ' + self.certficate_css + ' .no-content a.new-button').text[0] + ################ # Wait Actions ################ diff --git a/common/test/acceptance/tests/studio/test_studio_settings_certificates.py b/common/test/acceptance/tests/studio/test_studio_settings_certificates.py index 77d5857859..eff3531a89 100644 --- a/common/test/acceptance/tests/studio/test_studio_settings_certificates.py +++ b/common/test/acceptance/tests/studio/test_studio_settings_certificates.py @@ -70,7 +70,8 @@ class CertificatesTest(StudioCourseTest): shown when no certificate exist. Given I have a course without certificates When I go to the Certificates page in Studio - Then I see "You have not created any certificates yet." message + Then I see "You have not created any certificates yet." message and + a link with text "Set up your certificate" """ self.certificates_page.visit() self.assertTrue(self.certificates_page.no_certificates_message_shown) @@ -78,6 +79,10 @@ class CertificatesTest(StudioCourseTest): "You have not created any certificates yet.", self.certificates_page.no_certificates_message_text ) + self.assertIn( + "Set up your certificate", + self.certificates_page.new_certificate_link_text + ) def test_can_create_and_edit_certficate(self): """