# Shot Bulk Status Change Test

# Shot Table Bulk Task Status Change - Test Plan

## 🎯 Feature Overview

This test verifies the bulk task status change functionality for the shot data table, similar to the existing task data table implementation.

### Key Features Implemented:

- Bulk status change buttons appear in task status column headers when shots are selected
- Popover with colored status badges for each task status option
- Selection count tracking to show/hide bulk action buttons
- Bulk update functionality that changes status for all selected shots
- Toast notifications for successful bulk updates
- Error handling for failed bulk operations

## 🧪 Test Scenarios

### Test 1: Bulk Status Change Button Visibility

1. Navigate to the shot table view
2. Ensure no shots are selected initially
3. Verify that task status column headers show only the column name and sort icon
4. Select one or more shots using checkboxes
5. Verify that task status column headers now show a dropdown button (ChevronDown icon)
6. Deselect all shots
7. Verify that dropdown buttons disappear

Expected: Bulk action buttons appear/disappear based on selection state

### Test 2: Bulk Status Change Popover

1. Select multiple shots (2-3 shots)
2. Click the dropdown button in any task status column header
3. Verify popover opens with title "Change [TaskType] Status"
4. Verify all task status options are shown as colored badges:
   - Not Started (secondary)
   - In Progress (default)
   - Submitted (outline)
   - Approved (default)
   - Retake (destructive)
5. Click outside popover to close it

Expected: Popover shows correctly formatted status options with proper colors

### Test 3: Bulk Status Update Functionality

1. Select 2-3 shots with different current task statuses
2. Note the current status of each selected shot for a specific task type
3. Click the bulk action button for that task type
4. Select a different status from the popover (e.g., "In Progress")
5. Verify popover closes automatically
6. Verify all selected shots now show the new status for that task type
7. Verify success toast appears with message like "Updated [TaskType] status for X shots"

Expected: All selected shots update to the new status with success notification

### Test 4: Multiple Task Types

1. Select multiple shots
2. Verify bulk action buttons appear in ALL visible task type columns
3. Test bulk update for different task types (e.g., Animation, Lighting, Compositing)
4. Verify each task type can be updated independently
5. Verify updates don't affect other task types

Expected: Each task type column has independent bulk update functionality

### Test 5: Error Handling

1. Try to use bulk action without selecting any shots
2. Verify appropriate error message appears
3. Test with network disconnected (if possible)
4. Verify error handling for failed API calls

Expected: Appropriate error messages for edge cases

## 🔧 Implementation Details

### Files Modified:

frontend/src/components/shot/columns.ts - Added bulk status change button in task column headers - Added popover with status badges - Added selection count checking frontend/src/components/shot/ShotBrowser.vue - Added selectedShotIds tracking - Added getSelectedCount() function - Added handleBulkTaskStatusChange() function - Updated createStableMeta() with new callbacks

### Key Components Used:

- Popover/PopoverContent/PopoverTrigger for dropdown UI
- TaskStatusBadge for colored status display
- ChevronDown icon for dropdown button
- Toast notifications for user feedback

## ✅ Acceptance Criteria

- Bulk action buttons only appear when shots are selected (count > 0)
- Each task type column has its own independent bulk action button
- Popover shows all available task statuses with proper colors
- Bulk updates work correctly for multiple selected shots
- Success/error notifications provide appropriate feedback
- UI matches the existing task table bulk action pattern
- Performance remains smooth with multiple selections

## 🚀 Ready for Testing

The bulk task status change functionality has been implemented for the shot data table. The feature follows the same pattern as the existing task data table implementation and provides:

- Conditional UI: Bulk action buttons appear only when shots are selected
- Intuitive Interface: Dropdown buttons in task column headers with colored status badges
- Bulk Operations: Update task status for multiple shots simultaneously
- User Feedback: Toast notifications for success/error states
- Consistent Design: Matches existing UI patterns and styling

Next Steps: Test the functionality in the application to ensure it works as expected and provides a smooth user experience.