From be5b27b06e2ef737974304f12f56da7430eb3ee3 Mon Sep 17 00:00:00 2001 From: Awais Ansari <79941147+awais-ansari@users.noreply.github.com> Date: Tue, 15 Feb 2022 16:41:31 +0500 Subject: [PATCH] feat: update the discussion preview bar text (#29916) * feat: update the discussion preview bar text * fix: update the legacy view button color * test: fix discussion preview bar failing test cases after text update --- lms/djangoapps/discussion/tests/test_views.py | 4 ++-- lms/templates/discussion/_switch_experience_fragment.html | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lms/djangoapps/discussion/tests/test_views.py b/lms/djangoapps/discussion/tests/test_views.py index 79984d21cd..284eb17409 100644 --- a/lms/djangoapps/discussion/tests/test_views.py +++ b/lms/djangoapps/discussion/tests/test_views.py @@ -2295,7 +2295,7 @@ class ForumMFETestCase(ForumsEnableMixin, SharedModuleStoreTestCase): response = self.client.get(reverse("forum_form_discussion", args=[self.course.id])) content = response.content.decode('utf8') if mfe_url and is_staff: - assert "made some changes to this experience!" in content + assert "You are viewing an educator only preview of the new discussions experience!" in content if toggle_enabled: assert "legacy experience" in content assert "new experience" not in content @@ -2303,7 +2303,7 @@ class ForumMFETestCase(ForumsEnableMixin, SharedModuleStoreTestCase): assert "legacy experience" not in content assert "new experience" in content else: - assert "made some changes to this experience!" not in content + assert "You are viewing an educator only preview of the new discussions experience!" not in content @override_settings(DISCUSSIONS_MICROFRONTEND_URL="http://test.url") @ddt.data(*itertools.product((True, False), ("legacy", "new", None))) diff --git a/lms/templates/discussion/_switch_experience_fragment.html b/lms/templates/discussion/_switch_experience_fragment.html index abcf9aa908..ec68007985 100644 --- a/lms/templates/discussion/_switch_experience_fragment.html +++ b/lms/templates/discussion/_switch_experience_fragment.html @@ -9,20 +9,20 @@ from django.utils.translation import ugettext as _ % if show_banner:
- ${_("We've made some changes to this experience! (Preview for educators only)")} + ${_("You are viewing an educator only preview of the new discussions experience!")}
% if show_mfe: - + ${_("View legacy experience")} % if share_feedback_url: - + ${_("Share feedback")} % endif % else: - + ${_("View the new experience")} % endif