Skip to content

Manchester | 26-ITP-Sept | Aklilu Mihtsun | Sprint 3 | Build a todo-list app - #1581

Open
AkliluMihtsun wants to merge 7 commits into
CodeYourFuture:mainfrom
AkliluMihtsun:coursework/Sprint-3-todo-list
Open

AkliluMihtsun wants to merge 7 commits into
CodeYourFuture:mainfrom
AkliluMihtsun:coursework/Sprint-3-todo-list

Conversation

@AkliluMihtsun

Copy link
Copy Markdown

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Task code

CYF-1097

Changelist

I have added the button to delete the completed tasks, and I have tested it

@github-actions

This comment has been minimized.

@AkliluMihtsun AkliluMihtsun added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 23, 2026
Comment on lines +97 to +98
expect(todos[0]).toEqual(todosBeforeDeletionCompleted[1]);
expect(todos[1]).toEqual(todosBeforeDeletionCompleted[3]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After deleting the completed tasks, what assertion confirms there are no extra entries beyond the two expected tasks?

To "like" or "dislike" this comment, please follow this link

Comment thread Sprint-3/todo-list/todos.mjs Outdated
export function toggleCompletedOnTask(todos, taskIndex) {
if (todos[taskIndex]) {
todos[taskIndex].completed = !todos[taskIndex].completed;
todos[taskIndex].completed = !todos[taskIndex].completed; // changes false to true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this comment describe the case where completed is already true?

To "like" or "dislike" this comment, please follow this link

@cyf-ai-code-reviewer cyf-ai-code-reviewer Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 23, 2026
@github-actions

This comment has been minimized.

@cyf-ai-code-reviewer cyf-ai-code-reviewer Bot added the Reviewed Volunteer to add when completing a review with trainee action still to take. label Nov 23, 2026
@cyf-ai-code-reviewer

Copy link
Copy Markdown

The CYF AI review has left comments. It will only review a PR one time. When you have addressed these comments, please request review again and a volunteer will take a look.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@AkliluMihtsun AkliluMihtsun changed the title Coursework/sprint 3 todo list Manchester | 26-ITP-Sept | Aklilu Mihtsun | Sprint 3 | Build a todo-list app Nov 23, 2026
@AkliluMihtsun AkliluMihtsun added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 23, 2026
@hackertainment hackertainment added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Reviewed Volunteer to add when completing a review with trainee action still to take. labels Nov 27, 2026

@hackertainment hackertainment left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code generally looks ok to me. Just need to add two more test cases to increase testing coverage. Thank you.

Comment on lines +93 to +100
test("Delete all completed tasks", () => {
const todos = createMockTodos();
const todosBeforeDeletionCompleted = createMockTodos();
Todos.deleteCompleted(todos);
expect(todos).toHaveLength(2);
expect(todos[0]).toEqual(todosBeforeDeletionCompleted[1]);
expect(todos[1]).toEqual(todosBeforeDeletionCompleted[3]);
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test case is correct. How about when all tasks are completed or when all tasks incomplete? Please add these two two cases as well. Thank you.

@hackertainment hackertainment added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants