Commit graph

3 commits

Author SHA1 Message Date
callumalpass
c8a946eb27 Remove unused MinimalNativeCache and update tests to use TaskManager
MinimalNativeCache was completely unused in production code - it was replaced
by TaskManager but never deleted. This commit removes ~1,910 lines of dead code.

Changes:
- Deleted src/utils/MinimalNativeCache.ts (1,910 lines)
- Deleted 4 dedicated MinimalNativeCache test files
- Updated 7 FilterService test files to use TaskManager instead
- Updated mock factories to reference TaskManager
- Updated comments in main.ts and FilterService.ts

Evidence it was unused:
- Zero imports in src/ (only in tests)
- Zero instantiations in production code
- main.ts uses TaskManager (this.cacheManager)
- FilterService uses TaskManager in production
- TaskManager explicitly does NOT cache (JIT design)

The TaskManager approach:
- Reads on-demand from Obsidian's native metadataCache
- No internal indexes or caching
- Event-driven to stay in sync
- Simpler and more reliable than MinimalNativeCache

Build Verified: ✓
Tests Updated: ✓

Total Impact: ~2,000 lines removed
2025-11-15 22:24:04 +11:00
callumalpass
381992174a test: add tests for non-string values in frontmatter tags
Ensures the fix for #776 doesn't regress by testing that:
- Valid string tags work correctly
- Non-string values (numbers, booleans, objects, arrays) are safely skipped
- Mixed arrays with both string and non-string values are handled
- Empty arrays and all-non-string arrays return false appropriately
2025-09-30 18:02:59 +10:00
renatomen
f54651bf8a test: add comprehensive test coverage for hierarchical subgroup functionality
- Add HierarchicalGroupingService sorting tests
  * Test "No <field>" positioning for ascending and descending order
  * Verify type-aware sorting behavior for user fields
  * Validate subgroup key ordering consistency

- Add FilterBar subgroup menu integration tests
  * Test subgroup header and options in sort/group context menu
  * Verify subgroup reset behavior when primary group changes
  * Use dependency injection approach for reliable test execution

- Enhance test infrastructure for subgroup testing
  * Implement direct method testing instead of DOM manipulation
  * Add mock resolver functions for user field value resolution
  * Create reusable test helpers for subgroup scenarios

Provides robust test coverage for subgroup sorting logic, menu integration,
and cross-view consistency to ensure reliable hierarchical grouping behavior.
2025-09-18 10:15:08 +00:00