๐Ÿงช Task Selection Behavior Test Suite

Spec: task-browser-refactor

Task: 15. Test selection behavior

Requirements: 3.1, 3.2, 3.3, 3.4, 3.5

Test Summary

0
Total Tests
0
Passed
0
Failed
5
Pending

Test 1: Single-Click Selection (Requirement 3.1)

Requirement: WHEN a user clicks a row without modifiers THEN the system SHALL clear all selections and select only the clicked row

Test Instructions:

  1. Navigate to a project's Tasks view with multiple tasks
  2. Click on Task A (first task)
  3. Verify only Task A is selected (highlighted)
  4. Click on Task B (different task)
  5. Verify only Task B is selected, Task A is deselected
  6. Check selection count shows "1 task selected"

Test Case 1.1: Initial Single Selection

Expected: Clicking a task selects only that task

Test Case 1.2: Selection Replacement

Expected: Clicking another task clears previous selection and selects new task

Test Case 1.3: Selection Count Display

Expected: Selection count shows "1 task selected"

Test 2: Ctrl+Click Toggle Selection (Requirement 3.2)

Requirement: WHEN a user Ctrl+clicks (or Cmd+clicks on Mac) a row THEN the system SHALL toggle that row's selection state without affecting other selections

Test Instructions:

  1. Click Task A to select it
  2. Hold Ctrl (or Cmd on Mac) and click Task B
  3. Verify both Task A and Task B are selected
  4. Hold Ctrl and click Task A again
  5. Verify Task A is deselected, Task B remains selected
  6. Hold Ctrl and click Task C
  7. Verify Task B and Task C are selected
  8. Check selection count shows correct number

Test Case 2.1: Add to Selection

Expected: Ctrl+clicking unselected task adds it to selection

Test Case 2.2: Remove from Selection

Expected: Ctrl+clicking selected task removes it from selection

Test Case 2.3: Preserve Other Selections

Expected: Ctrl+clicking does not affect other selected tasks

Test Case 2.4: Multiple Selection Count

Expected: Selection count shows "N tasks selected" for multiple selections

Test 3: Shift+Click Range Selection (Requirement 3.3)

Requirement: WHEN a user Shift+clicks a row THEN the system SHALL select all rows between the last clicked row and the current row

Test Instructions:

  1. Click Task 1 (first task in list)
  2. Hold Shift and click Task 5 (fifth task)
  3. Verify Tasks 1, 2, 3, 4, and 5 are all selected
  4. Click Task 3 (without modifiers) to reset
  5. Hold Shift and click Task 7
  6. Verify Tasks 3, 4, 5, 6, and 7 are selected
  7. Hold Shift and click Task 1
  8. Verify Tasks 1, 2, and 3 are selected (range works backwards)

Test Case 3.1: Forward Range Selection

Expected: Shift+clicking selects all tasks from first to last clicked

Test Case 3.2: Backward Range Selection

Expected: Shift+clicking earlier task selects range backwards

Test Case 3.3: Range Selection Count

Expected: Selection count shows correct number of tasks in range

Test 4: Select-All Checkbox (Requirement 3.4)

Requirement: WHEN a user clicks the header checkbox THEN the system SHALL toggle selection of all visible (filtered) rows

Test Instructions:

  1. Ensure no filters are applied (all tasks visible)
  2. Click the checkbox in the table header (leftmost column)
  3. Verify all visible tasks are selected
  4. Check selection count shows total number of tasks
  5. Click the header checkbox again
  6. Verify all tasks are deselected
  7. Apply a filter (e.g., status filter to show only "In Progress")
  8. Click the header checkbox
  9. Verify only filtered tasks are selected
  10. Remove filter and verify selection persists for previously selected tasks

Test Case 4.1: Select All Visible Tasks

Expected: Clicking header checkbox selects all visible tasks

Test Case 4.2: Deselect All Tasks

Expected: Clicking header checkbox again deselects all tasks

Test Case 4.3: Select All Filtered Tasks

Expected: With filters applied, header checkbox selects only visible filtered tasks

Test Case 4.4: Indeterminate State

Expected: When some (but not all) tasks are selected, checkbox shows indeterminate state

Test 5: Double-Click Opens Detail Panel (Requirement 3.5)

Requirement: WHEN a user double-clicks a row THEN the system SHALL open the task detail panel without modifying selection state

Test Instructions:

  1. Select Task A and Task B (using Ctrl+click)
  2. Double-click Task A
  3. Verify Task detail panel opens for Task A
  4. Verify both Task A and Task B remain selected
  5. Close the detail panel
  6. Double-click Task C (unselected task)
  7. Verify Task detail panel opens for Task C
  8. Verify Task A and Task B remain selected (selection unchanged)
  9. On mobile/tablet, verify detail panel opens in a sheet/modal

Test Case 5.1: Detail Panel Opens

Expected: Double-clicking a task opens the detail panel

Test Case 5.2: Selection Preserved on Selected Task

Expected: Double-clicking a selected task does not change selection

Test Case 5.3: Selection Preserved on Unselected Task

Expected: Double-clicking an unselected task does not change existing selection

Test Case 5.4: Detail Panel Content

Expected: Detail panel shows correct task information

Test Case 5.5: Mobile Detail Panel

Expected: On mobile, detail panel opens in sheet/modal format

Additional Integration Tests

These tests verify the selection behavior works correctly in combination with other features.

Test Case 6.1: Visual Feedback

Expected: Selected rows have distinct background color (bg-muted/50)

Test Case 6.2: Hover State

Expected: Hovering over rows shows hover effect distinct from selection

Test Case 6.3: Cursor Pointer

Expected: Cursor changes to pointer when hovering over rows

Test Case 6.4: Text Selection Prevention

Expected: During shift-click, text is not selected (select-none class)

Test Case 6.5: Empty Table

Expected: When no tasks exist, table shows "No tasks found" message

๐Ÿ“ Test Execution Notes

Use this section to record any issues, observations, or notes during testing.

โœ… Test Completion Checklist

Before marking this task as complete, ensure: