Commit 99cd48c8 by Awais Jibran

Merge pull request #9179 from edx/aj/tnl2855-depricated-blocks-in-edge

Fixed ORA1 deprecated warning message
parents 8477146c 1ac90573
...@@ -69,7 +69,13 @@ from microsite_configuration import microsite ...@@ -69,7 +69,13 @@ from microsite_configuration import microsite
<nav class="nav-related" aria-label="${_('Unsupported Components')}"> <nav class="nav-related" aria-label="${_('Unsupported Components')}">
<ul> <ul>
% for component_parent_url, component_display_name in deprecated_blocks_info['blocks']: % for component_parent_url, component_display_name in deprecated_blocks_info['blocks']:
<li class="nav-item"><a href="${component_parent_url}">${_(component_display_name)}</a></li> <li class="nav-item">
% if component_display_name:
<a href="${component_parent_url}">${_(component_display_name)}</a>
% else:
<a href="${component_parent_url}">${_("Deprecated Component")}</a>
% endif
</li>
% endfor % endfor
</ul> </ul>
</nav> </nav>
......
...@@ -1599,6 +1599,7 @@ class DeprecationWarningMessageTest(CourseOutlineTest): ...@@ -1599,6 +1599,7 @@ class DeprecationWarningMessageTest(CourseOutlineTest):
'from the course advanced settings. To do this, go to the Advanced Settings ' 'from the course advanced settings. To do this, go to the Advanced Settings '
'page, locate the "Advanced Module List" setting, and then delete the following ' 'page, locate the "Advanced Module List" setting, and then delete the following '
'modules from the list.') 'modules from the list.')
DEFAULT_DISPLAYNAME = "Deprecated Component"
def _add_deprecated_advance_modules(self, block_types): def _add_deprecated_advance_modules(self, block_types):
""" """
...@@ -1686,6 +1687,32 @@ class DeprecationWarningMessageTest(CourseOutlineTest): ...@@ -1686,6 +1687,32 @@ class DeprecationWarningMessageTest(CourseOutlineTest):
deprecated_modules_list=['peergrading', 'combinedopenended'] deprecated_modules_list=['peergrading', 'combinedopenended']
) )
def test_deprecation_warning_with_no_displayname(self):
"""
Scenario: Verify deprecation warning message if ORA1 components are present.
Given I have created 1 ORA1 deprecated component
When I go to course outline
Then I see ORA1 deprecated warning
And I see correct ORA1 deprecated warning heading text
And I see list of ORA1 components with correct message
"""
parent_vertical = self.course_fixture.get_nested_xblocks(category="vertical")[0]
# Create a deprecated ORA1 component with display_name to be empty and make sure
# the deprecation warning is displayed with
self.course_fixture.create_xblock(
parent_vertical.locator,
XBlockFixtureDesc(category='combinedopenended', display_name="", data=load_data_str('ora_peer_problem.xml'))
)
self.course_outline_page.visit()
self._verify_deprecation_warning_info(
deprecated_blocks_present=False,
components_present=True,
components_display_name_list=[self.DEFAULT_DISPLAYNAME],
)
def test_warning_with_ora1_advance_modules_only(self): def test_warning_with_ora1_advance_modules_only(self):
""" """
Scenario: Verify that deprecation warning message is shown if only Scenario: Verify that deprecation warning message is shown if only
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment