From c502366661c99afe0f707cf59194ec9428656092 Mon Sep 17 00:00:00 2001 From: Shiva Gupta Date: Wed, 31 Dec 2025 16:38:25 +0530 Subject: [PATCH] test(Tasks): Add comprehensive test suite for Tasks component - Add tests for Keyboard Navigation (ArrowUp, ArrowDown, boundary stops) - Add tests for Hotkey Shortcuts ('a', 'c', 'd', 'e', 'f', 'p', 'r', 's', 't') - Add tests for complete/delete hotkeys when dialog is already open - Add tests for Sync button click and error toast on sync failure - Add tests for LocalStorage persistence (tasksPerPage, lastSyncTime) - Add tests for sync time auto-update interval - Add tests for error handling (add task, edit task failures) - Add tests for mouse hover handlers (mouseEnter, mouseLeave) - Updates: #300 --- .../HomeComponents/Tasks/TaskDialog.tsx | 11 +- .../components/HomeComponents/Tasks/Tasks.tsx | 2 +- .../Tasks/__tests__/Tasks.test.tsx | 1951 +++++++++++++---- 3 files changed, 1481 insertions(+), 483 deletions(-) diff --git a/frontend/src/components/HomeComponents/Tasks/TaskDialog.tsx b/frontend/src/components/HomeComponents/Tasks/TaskDialog.tsx index 7b2e8e77..e948a316 100644 --- a/frontend/src/components/HomeComponents/Tasks/TaskDialog.tsx +++ b/frontend/src/components/HomeComponents/Tasks/TaskDialog.tsx @@ -787,7 +787,10 @@ export const TaskDialog = ({ }) } > - + @@ -1221,7 +1224,10 @@ export const TaskDialog = ({ onUpdateState({ editedRecur: value }) } > - + @@ -1449,6 +1455,7 @@ export const TaskDialog = ({