Skip to content

Commit

Permalink
update tasks and project view
Browse files Browse the repository at this point in the history
  • Loading branch information
hussaino03 committed Dec 28, 2024
1 parent bb4ce79 commit ce7283d
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ describe('Task Component Overdue Tests', () => {
test('displays correct overdue penalty for completed overdue task', () => {
const twoDaysAgo = new Date();
twoDaysAgo.setDate(twoDaysAgo.getDate() - 2);
const overdueDeadline = twoDaysAgo.toISOString().split('T')[0];
const overdueDeadline = twoDaysAgo.toISOString().split('T')[0]; // This is in YYYY-MM-DD format

const task = {
id: '4',
Expand Down Expand Up @@ -136,12 +136,14 @@ describe('Task Component Overdue Tests', () => {
});
fireEvent.click(expandButton);

// Now look for XP and penalty
// Check for XP display
expect(screen.getByText((content) => {
return content.includes('100') && content.includes('xp');
})).toBeInTheDocument();

// Check for date display with ISO format (YYYY-MM-DD)
expect(screen.getByText((content) => {
return content.includes('Due:') && content.includes('2024-01-13');
return content.includes('Due:') && content.includes(overdueDeadline);
})).toBeInTheDocument();
});
});
Expand Down

0 comments on commit ce7283d

Please sign in to comment.