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
This commit is contained in:
Awais Ansari
2022-02-15 16:41:31 +05:00
committed by GitHub
parent 2862fa8775
commit be5b27b06e
2 changed files with 6 additions and 6 deletions

View File

@@ -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)))

View File

@@ -9,20 +9,20 @@ from django.utils.translation import ugettext as _
% if show_banner:
<div class="upgrade-banner d-flex bg-primary text-white align-items-center px-4 py-3">
<div class="d-flex w-100">
${_("We've made some changes to this experience! (Preview for educators only)")}
${_("You are viewing an educator only preview of the new discussions experience!")}
</div>
% if show_mfe:
<a class="btn btn-outline-light mr-2" href="${legacy_url}">
<a class="btn btn-inverse-primary" href="${legacy_url}">
${_("View legacy experience")}
</a>
% if share_feedback_url:
<a class="btn btn-outline-light" href="${share_feedback_url}">
<a class="btn btn-inverse-primary ml-2" href="${share_feedback_url}">
${_("Share feedback")}
</a>
% endif
% else:
<a class="btn btn-outline-light mr-2" href="${mfe_url}">
<a class="btn btn-inverse-primary ml-2" href="${mfe_url}">
${_("View the new experience")}
</a>
% endif