Skip to content

Commit

Permalink
show correct icon on todo list for peer reviews
Browse files Browse the repository at this point in the history
fixes ADMIN-1415

test plan:
 - create peer review assigned to student
 - ensure icon in To Do list is correct and no longer uses Note icon

Change-Id: I763c830c68d04bc01b7b096a05364c8bcd728c40
Reviewed-on: https://gerrit.instructure.com/163785
Tested-by: Jenkins
Reviewed-by: Mysti Sadler <[email protected]>
QA-Review: Ed Schiebel <[email protected]>
Product-Review: Carl Kibler <[email protected]>
  • Loading branch information
Carl Kibler committed Sep 11, 2018
1 parent 6106834 commit ba99a57
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import DiscussionIcon from '@instructure/ui-icons/lib/Line/IconDiscussion';
import NoteIcon from '@instructure/ui-icons/lib/Line/IconNote';
import CalendarIcon from '@instructure/ui-icons/lib/Line/IconCalendarMonth';
import PageIcon from '@instructure/ui-icons/lib/Line/IconMsWord';
import XIcon from '@instructure/ui-icons/lib/Line/IconX';
import PeerReviewIcon from '@instructure/ui-icons/lib/Line/IconPeerReview';

import { formatDateAtTimeWithoutYear } from '../../utilities/dateUtils';
import formatMessage from '../../format-message';
Expand All @@ -51,6 +51,8 @@ const getIconComponent = (itemType) => {
return <CalendarIcon label={formatMessage('Calendar Event')} className="ToDoSidebarItem__Icon" />;
case 'Page':
return <PageIcon label={formatMessage('Page')} className="ToDoSidebarItem__Icon" />;
case 'Peer Review':
return <PeerReviewIcon label={formatMessage('Peer Review')} className="ToDoSidebarItem__Icon" />;
default:
return <NoteIcon label={formatMessage('To Do')} className="ToDoSidebarItem__Icon" />;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ it('renders page icon for pages', () => {
expect(wrapper.find('IconMsWord').exists()).toBe(true);
});

it('renders peer review icon for peer reviews', () => {
const wrapper = shallow(
<ToDoItem {...getDefaultProps({ type: 'Peer Review' })} />
);
expect(wrapper.find('IconPeerReview').exists()).toBe(true);
});

it('renders note icon for planner_notes', () => {
const wrapper = shallow(
<ToDoItem {...getDefaultProps({ type: '' })} />
Expand Down

0 comments on commit ba99a57

Please sign in to comment.