Skip to content

Commit

Permalink
Added test case for postCompletionNotes when its length is less than 25
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaitanya1672 committed Jul 6, 2024
1 parent 48b7deb commit de63c99
Showing 1 changed file with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,38 @@ const MOCKS = [
lastName: 'Shepherd',
},
},
{
_id: 'actionItem3',
assignee: {
_id: '658930fd2caa9d8d6908745c',
firstName: 'Harve',
lastName: 'Lance',
},
actionItemCategory: {
_id: 'actionItemCategory1',
name: 'ActionItemCategory 1',
},
preCompletionNotes: 'Pre Completion Text',
postCompletionNotes: 'Post Completion Text',
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',
},
},
],
},
refetch: jest.fn(),
Expand Down Expand Up @@ -544,6 +576,12 @@ describe('Event Action Items Page', () => {
expect(
screen.getAllByTestId('actionItemPostCompletionNotesOverlay')[0],
).toHaveTextContent('Long Post Completion Note...');
expect(
screen.getAllByTestId('actionItemPostCompletionNotesOverlay')[1],
).toHaveTextContent('Post Completion Text');
expect(
screen.getAllByTestId('actionItemPreCompletionNotesOverlay')[2],
).toHaveTextContent('Pre Completion Text');
});

test('opens and closes the update and delete modals through the preview modal', async () => {
Expand Down

0 comments on commit de63c99

Please sign in to comment.