forked from automazeio/ccpm
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
epic:vscode-extensionTasks for vscode-extensionTasks for vscode-extensiontaskIndividual taskIndividual task
Description
Task: Integration tests - TreeDataProvider + VSCode API (90% coverage)
Description
Create integration tests for the TreeDataProvider that validate the complete Epic/Task hierarchy rendering in the VSCode tree view. Test the interaction between TreeDataProvider, TreeItem nodes, and VSCode's tree view APIs with 90% minimum coverage.
Acceptance Criteria
- Tests verify TreeDataProvider getChildren() returns correct hierarchy
- Tests validate TreeItem creation for Epic and Task nodes
- Tests check tree view registration and lifecycle
- Tests verify refresh behavior and onDidChangeTreeData events
- Tests validate tree expansion and collapse states
- Tests check context menu command availability
- Code coverage reaches minimum 90% (lines, branches, functions)
- All tests pass consistently
Technical Details
- Create test file:
test/integration/treeview/treeDataProvider.test.ts - Test scenarios:
- Tree view registration with VSCode window API
- getChildren() with null (root), Epic node, Task node
- getTreeItem() returns properly configured TreeItem
- Epic nodes have correct collapsible state
- Task nodes have click commands configured
- Tree refresh triggers onDidChangeTreeData
- Empty epic handling (no tasks)
- Invalid file path handling
- Tree view reveal() functionality
- Use @vscode/test-electron for VSCode API integration
- Create test fixtures: sample epic/task files
- Test with actual VSCode tree view rendering
- Mock file system with test data
- Files affected:
test/integration/treeview/*.test.ts(new)
Dependencies
- Task 13 - TreeDataProvider implementation completed
- Task 14 - TreeItem classes implemented
- Task 3 - Testing infrastructure configured
Effort Estimate
- Size: M
- Hours: 8
- Parallel: true
Definition of Done
- Code implemented
- Tests written and passing
- Documentation updated
- Code reviewed
- Coverage report shows 90%+ coverage
- Integration with VSCode API validated
Metadata
Metadata
Assignees
Labels
epic:vscode-extensionTasks for vscode-extensionTasks for vscode-extensiontaskIndividual taskIndividual task