fix: Updated discussions banner text as per changed requirements (#29961)

This commit is contained in:
Ahtisham Shahid
2022-02-22 13:03:03 +05:00
committed by GitHub
parent 2b32828083
commit 4138c2cc16
2 changed files with 8 additions and 2 deletions

View File

@@ -2296,11 +2296,11 @@ 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 toggle_enabled:
assert "An educator preview of new discussions experience is available!" in content
assert "You are viewing an educator only preview of the new discussions experience!" in content
assert "legacy experience" in content
assert "new experience" not in content
else:
assert "An educator preview of new discussions experience is available!" 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

@@ -8,9 +8,15 @@ 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">
% if show_mfe:
<div class="d-flex w-100">
${_("You are viewing an educator only preview of the new discussions experience!")}
</div>
% else:
<div class="d-flex w-100">
${_("An educator preview of new discussions experience is available!")}
</div>
%endif
% if show_mfe:
<a class="btn btn-inverse-primary" href="${legacy_url}">