diff --git a/cms/static/js/spec/views/pages/container_subviews_spec.js b/cms/static/js/spec/views/pages/container_subviews_spec.js index c57a1102b4..fc3dca0e89 100644 --- a/cms/static/js/spec/views/pages/container_subviews_spec.js +++ b/cms/static/js/spec/views/pages/container_subviews_spec.js @@ -519,37 +519,25 @@ define(["jquery", "underscore", "underscore.string", "js/spec_helpers/create_sin describe("Message Area", function() { var messageSelector = '.container-message .warning', - unchangedWarningMessage = 'This unit is visible to students. If you edit the unit, you must re-publish it for students to see your changes.', - hasChangesWarningMessage = 'Caution: The last published version of this unit is live. By publishing changes you will change the student experience.'; + warningMessage = 'Caution: The last published version of this unit is live. By publishing changes you will change the student experience.'; it('is empty for a unit that is not currently visible to students', function() { renderContainerPage(this, mockContainerXBlockHtml, { - currently_visible_to_students: false, - has_changes: false + currently_visible_to_students: false }); expect(containerPage.$(messageSelector).text().trim()).toBe(''); }); - it('shows a message for a unit that is currently visible to students and is unchanged', function() { + it('shows a message for a unit that is currently visible to students', function() { renderContainerPage(this, mockContainerXBlockHtml, { - currently_visible_to_students: true, - has_changes: false + currently_visible_to_students: true }); - expect(containerPage.$(messageSelector).text().trim()).toBe(unchangedWarningMessage); - }); - - it('shows a message for a unit that is currently visible to students and has changes', function() { - renderContainerPage(this, mockContainerXBlockHtml, { - currently_visible_to_students: true, - has_changes: true - }); - expect(containerPage.$(messageSelector).text().trim()).toBe(hasChangesWarningMessage); + expect(containerPage.$(messageSelector).text().trim()).toBe(warningMessage); }); it('hides the message when the unit is hidden from students', function() { renderContainerPage(this, mockContainerXBlockHtml, { - currently_visible_to_students: true, - has_changes: false + currently_visible_to_students: true }); fetch({ currently_visible_to_students: false }); expect(containerPage.$(messageSelector).text().trim()).toBe(''); @@ -557,11 +545,10 @@ define(["jquery", "underscore", "underscore.string", "js/spec_helpers/create_sin it('shows a message when a unit is made visible', function() { renderContainerPage(this, mockContainerXBlockHtml, { - currently_visible_to_students: false, - has_changes: false + currently_visible_to_students: false }); fetch({ currently_visible_to_students: true }); - expect(containerPage.$(messageSelector).text().trim()).toBe(unchangedWarningMessage); + expect(containerPage.$(messageSelector).text().trim()).toBe(warningMessage); }); }); }); diff --git a/cms/static/js/views/pages/container_subviews.js b/cms/static/js/views/pages/container_subviews.js index 4b3f0a18c9..32a78f0d92 100644 --- a/cms/static/js/views/pages/container_subviews.js +++ b/cms/static/js/views/pages/container_subviews.js @@ -38,13 +38,12 @@ define(["jquery", "underscore", "gettext", "js/views/baseview", "js/views/utils/ }, shouldRefresh: function(model) { - return ViewUtils.hasChangedAttributes(model, ['currently_visible_to_students', 'has_changes']); + return ViewUtils.hasChangedAttributes(model, ['currently_visible_to_students']); }, render: function() { this.$el.html(this.template({ - currentlyVisibleToStudents: this.model.get('currently_visible_to_students'), - hasChanges: this.model.get('has_changes') + currentlyVisibleToStudents: this.model.get('currently_visible_to_students') })); return this; } diff --git a/cms/templates/js/container-message.underscore b/cms/templates/js/container-message.underscore index 508bde2a11..bf70262d38 100644 --- a/cms/templates/js/container-message.underscore +++ b/cms/templates/js/container-message.underscore @@ -2,11 +2,7 @@
<% } %> diff --git a/common/test/acceptance/pages/studio/container.py b/common/test/acceptance/pages/studio/container.py index a33d48a16e..b4ef1fc7ee 100644 --- a/common/test/acceptance/pages/studio/container.py +++ b/common/test/acceptance/pages/studio/container.py @@ -122,8 +122,7 @@ class ContainerPage(PageObject): if not warnings.is_present(): return False warning_text = warnings.first.text[0] - return (warning_text == "This unit is visible to students. If you edit the unit, you must re-publish it for students to see your changes." - or warning_text == "Caution: The last published version of this unit is live. By publishing changes you will change the student experience.") + return warning_text == "Caution: The last published version of this unit is live. By publishing changes you will change the student experience." @property def publish_action(self):