Skip to content

Commit

Permalink
improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
meetulr committed Mar 5, 2024
1 parent 2c52f15 commit c597076
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/components/ActionItems/ActionItemsContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,18 +285,12 @@ function actionItemsContainer({
data-testid="actionItemPostCompletionNotesOverlay"
onMouseEnter={() => {
setActionItemId(actionItem._id);
setActionItemNotes(
actionItem.postCompletionNotes
? actionItem.postCompletionNotes
: t('actionItemCompleted'),
);
setActionItemNotes(actionItem.postCompletionNotes);
}}
>
{actionItem.postCompletionNotes?.length > 25
? `${actionItem.postCompletionNotes.substring(0, 25)}...`
: actionItem.postCompletionNotes
? actionItem.postCompletionNotes
: t('actionItemCompleted')}
: actionItem.postCompletionNotes}
</span>
</OverlayTrigger>
) : (
Expand Down Expand Up @@ -383,6 +377,7 @@ function actionItemsContainer({
data-testid="actionItemsStatusChangeNotes"
placeholder={t('actionItemCompleted')}
autoComplete="off"
required
value={
isActionItemCompleted
? formState.preCompletionNotes
Expand Down
32 changes: 32 additions & 0 deletions src/components/ActionItems/ActionItemsContainerProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,38 @@ export const props = {
lastName: 'Shepherd',
},
},
{
_id: 'actionItem3',
assignee: {
_id: 'user1',
firstName: 'Harve',
lastName: 'Lance',
},
actionItemCategory: {
_id: 'actionItemCategory1',
name: 'ActionItemCategory 1',
},
preCompletionNotes: 'Pre Completion Notes more than 25 characters',
postCompletionNotes: 'Post Completion Notes more than 25 characters',
assignmentDate: new Date('2024-02-14'),
dueDate: new Date('2024-02-21'),
completionDate: new Date('2024-02-21'),
isCompleted: true,
assigner: {
_id: 'user0',
firstName: 'Wilt',
lastName: 'Shepherd',
},
event: {
_id: 'event1',
title: 'event 1',
},
creator: {
_id: 'user0',
firstName: 'Wilt',
lastName: 'Shepherd',
},
},
],
membersData: [
{
Expand Down

0 comments on commit c597076

Please sign in to comment.