[Manager] Fix package version matching in conflict detection (#4530)

Co-authored-by: Jin Yi <jin12cc@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
comfy-jinyi
2025-07-25 14:10:55 +09:00
committed by Jin Yi
parent 9a8bd34170
commit e581925903
10 changed files with 143 additions and 113 deletions

View File

@@ -83,12 +83,12 @@ describe('useConflictDetectionStore', () => {
})
})
describe('getConflictsForPackage', () => {
describe('getConflictsForPackageByID', () => {
it('should find package by exact ID match', () => {
const store = useConflictDetectionStore()
store.setConflictedPackages(mockConflictedPackages)
const result = store.getConflictsForPackage('ComfyUI-Manager')
const result = store.getConflictsForPackageByID('ComfyUI-Manager')
expect(result).toBeDefined()
expect(result?.package_id).toBe('ComfyUI-Manager')
@@ -99,7 +99,7 @@ describe('useConflictDetectionStore', () => {
const store = useConflictDetectionStore()
store.setConflictedPackages(mockConflictedPackages)
const result = store.getConflictsForPackage('non-existent-package')
const result = store.getConflictsForPackageByID('non-existent-package')
expect(result).toBeUndefined()
})