ccsync icon indicating copy to clipboard operation
ccsync copied to clipboard

Tracking Issue: Tasks Component Test Improvements

Open ShivaGupta-14 opened this issue 10 months ago • 4 comments

Overview

This is a tracking issue to organize the work for adding comprehensive tests to the Tasks component in smaller, reviewable PRs. Breaking down the original PR.

Related to: #300

Tasks Component Tests

  • [x] Keyboard Navigation Tests
  • [ ] Priority Editing Tests
  • [ ] Recur Editing Tests
  • [ ] Reports Toggle Tests
  • [ ] Annotation Tests
  • [ ] Sorting
  • [ ] Add Task Submission

Shared Test Utilities (Reorg)

  • [ ] Create test-utils/helper.ts
  • [ ] Create test-utils/setup.tsx

PRs

Task PR Status Feedback
Reorganize into proper describe blocks #435 Close not needed now(split needed)
Keyboard Navigation Tests #434 Merged
Recur tests - -
Priority tests #461 Open
Reports tests - -

ShivaGupta-14 avatar Jan 24 '26 11:01 ShivaGupta-14

Do change this to separate checklist for each component for which tests are yet to be added or updated. And the reorg tasks as well

its-me-abhishek avatar Jan 24 '26 14:01 its-me-abhishek

Added Reports Toggle tests, opening a PR now

adiprathapa avatar Mar 19 '26 16:03 adiprathapa

Hi @its-me-abhishek,

I've implemented unit test coverage for the Recur Editing checklist item in Tasks and opened a focused PR: #479.

The test suite covers:

  • Saving recurrence frequencies: Verifies that valid recurrence values (weekly, monthly, etc.) are correctly persisted through editTaskOnBackend.
  • Handling none: Ensures that selecting none triggers the guard logic and prevents unnecessary API requests.
  • Cancel functionality: Verifies that clicking Cancel discards the changes and restores the original recurrence state without invoking the backend.

All tests are passing locally, and no production code has been modified.

Happy to address any feedback. Thanks!

Aspirant200715 avatar Nov 12 '26 12:11 Aspirant200715

Hi @its-me-abhishek,

Following up on the Recur tests (#479), I've also implemented unit test coverage for the Annotation Editing checklist item in Tasks and opened a PR: #480 .

The test suite covers:

  • Adding annotations: Verifies that entering an annotation and pressing Enter correctly adds it and persists it to the backend via handleSaveAnnotations / editTaskOnBackend.
  • Removing annotations: Ensures that clicking the inline removal button (✖) removes the annotation from editedAnnotations before saving.
  • Input validation: Verifies that empty or whitespace-only inputs are ignored and do not create empty annotation badges.
  • Cancel functionality: Ensures that clicking Cancel dismisses the editor without triggering unnecessary API calls.

All 4 test cases are passing locally, and the complete Tasks test suite passes with 10 tests across 3 test files.

Happy to address any reviews and feedback. Thanks!

Aspirant200715 avatar Nov 12 '26 15:11 Aspirant200715