fix: Updated discussions banner text as per changed requirements (#29961)
This commit is contained in:
@@ -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)))
|
||||
|
||||
@@ -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}">
|
||||
|
||||
Reference in New Issue
Block a user