Merge pull request #10013 from edx/asadiqbal08/SOL-1262
SOL-1262 Update Studio Button Copy
This commit is contained in:
@@ -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.'),
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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'),
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<%- emptyMessage %>
|
||||
<a href="#" class="button new-button"><i class="icon fa fa-plus"></i>
|
||||
<%= interpolate(
|
||||
gettext("Add your first %(item_type)s"), {item_type: itemCategoryDisplayName}, true
|
||||
gettext("%(new_item_message)s"), {new_item_message: newItemMessage}, true
|
||||
) %></a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -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
|
||||
################
|
||||
|
||||
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user