Commit d15ff4b2 by Waheed Ahmed

After MKTG reviews a course the label should read: "Reviewed on xx/xx/xxxx".

ECOM-7696
parent 12346ec2
......@@ -1822,6 +1822,16 @@ class CourseDetailViewTests(TestCase):
self.assertContains(response, '<span class="icon fa fa-check" aria-hidden="true">', count=2)
self.assertContains(response, 'Send for Review', count=1)
self.course_state.marketing_reviewed = True
self.course_state.owner_role = PublisherUserRole.CourseTeam
self.course_state.save()
response = self.client.get(self.detail_page_url)
# Verify that content is marked as reviewed by both marketing and course team.
self.assertNotContains(response, 'Send for Review')
self.assertContains(response, 'Reviewed', count=2)
def test_edit_permission_with_owner_role(self):
"""
Test that user can see edit button if he has permission and has role for course.
......
......@@ -767,7 +767,10 @@ def get_course_role_widgets_data(user, course, state_object, change_state_url, p
name=CourseStateChoices.Review
).order_by('-modified').first()
if history_record:
role_widget['sent_for_review'] = history_record.modified
if hasattr(state_object, 'marketing_reviewed') and state_object.marketing_reviewed:
role_widget['reviewed'] = history_record.modified
else:
role_widget['sent_for_review'] = history_record.modified
role_widgets.append(role_widget)
......
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