Commit 0a347e12 by Matt Drayer

Merge pull request #10013 from edx/asadiqbal08/SOL-1262

SOL-1262 Update Studio Button Copy
parents 1d121b81 aec1b959
...@@ -15,6 +15,8 @@ function (gettext, ListView, CertificateItemView) { ...@@ -15,6 +15,8 @@ function (gettext, ListView, CertificateItemView) {
// Translators: this refers to a collection of certificates. // Translators: this refers to a collection of certificates.
itemCategoryDisplayName: gettext('certificate'), 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 // 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.'), emptyMessage: gettext('You have not created any certificates yet.'),
......
...@@ -15,6 +15,8 @@ define([ ...@@ -15,6 +15,8 @@ define([
// Translators: This refers to a content group that can be linked to a student cohort. // Translators: This refers to a content group that can be linked to a student cohort.
itemCategoryDisplayName: gettext('content group'), itemCategoryDisplayName: gettext('content group'),
newItemMessage: gettext('Add your first content group'),
emptyMessage: gettext('You have not created any content groups yet.'), emptyMessage: gettext('You have not created any content groups yet.'),
createItemView: function(options) { createItemView: function(options) {
......
...@@ -17,6 +17,8 @@ define([ ...@@ -17,6 +17,8 @@ define([
// Translators: this refers to a collection of groups. // Translators: this refers to a collection of groups.
itemCategoryDisplayName: gettext('group configuration'), itemCategoryDisplayName: gettext('group configuration'),
newItemMessage: gettext('Add your first group configuration'),
emptyMessage: gettext('You have not created any group configurations yet.'), emptyMessage: gettext('You have not created any group configurations yet.'),
createItemView: function(options) { createItemView: function(options) {
......
...@@ -38,6 +38,7 @@ define([ ...@@ -38,6 +38,7 @@ define([
render: function(model) { render: function(model) {
this.$el.html(this.template({ this.$el.html(this.template({
itemCategoryDisplayName: this.itemCategoryDisplayName, itemCategoryDisplayName: this.itemCategoryDisplayName,
newItemMessage: this.newItemMessage,
emptyMessage: this.emptyMessage, emptyMessage: this.emptyMessage,
length: this.collection.length, length: this.collection.length,
isEditing: model && model.get('editing'), isEditing: model && model.get('editing'),
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<%- emptyMessage %> <%- emptyMessage %>
<a href="#" class="button new-button"><i class="icon fa fa-plus"></i> <a href="#" class="button new-button"><i class="icon fa fa-plus"></i>
<%= interpolate( <%= interpolate(
gettext("Add your first %(item_type)s"), {item_type: itemCategoryDisplayName}, true gettext("%(new_item_message)s"), {new_item_message: newItemMessage}, true
) %></a> ) %></a>
</p> </p>
</div> </div>
......
...@@ -83,6 +83,13 @@ class CertificatesPage(CoursePage): ...@@ -83,6 +83,13 @@ class CertificatesPage(CoursePage):
""" """
return self.q(css='.wrapper-content ' + self.certficate_css + ' .no-content').text[0] 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 # Wait Actions
################ ################
......
...@@ -70,7 +70,8 @@ class CertificatesTest(StudioCourseTest): ...@@ -70,7 +70,8 @@ class CertificatesTest(StudioCourseTest):
shown when no certificate exist. shown when no certificate exist.
Given I have a course without certificates Given I have a course without certificates
When I go to the Certificates page in Studio 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.certificates_page.visit()
self.assertTrue(self.certificates_page.no_certificates_message_shown) self.assertTrue(self.certificates_page.no_certificates_message_shown)
...@@ -78,6 +79,10 @@ class CertificatesTest(StudioCourseTest): ...@@ -78,6 +79,10 @@ class CertificatesTest(StudioCourseTest):
"You have not created any certificates yet.", "You have not created any certificates yet.",
self.certificates_page.no_certificates_message_text 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): def test_can_create_and_edit_certficate(self):
""" """
......
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