mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 18:52:19 +00:00
[refactor] Simplify conflict detection types and improve code maintainability (#4589)
This commit is contained in:
@@ -98,7 +98,6 @@ describe.skip('useConflictDetection with Registry Store', () => {
|
||||
systemStats: {
|
||||
system: {
|
||||
comfyui_version: '0.3.41',
|
||||
python_version: '3.12.11',
|
||||
os: 'Darwin'
|
||||
},
|
||||
devices: [
|
||||
@@ -120,7 +119,6 @@ describe.skip('useConflictDetection with Registry Store', () => {
|
||||
mockSystemStatsStore.systemStats = {
|
||||
system: {
|
||||
comfyui_version: '0.3.41',
|
||||
python_version: '3.12.11',
|
||||
os: 'Darwin'
|
||||
},
|
||||
devices: [
|
||||
@@ -178,7 +176,6 @@ describe.skip('useConflictDetection with Registry Store', () => {
|
||||
|
||||
expect(environment.comfyui_version).toBe('0.3.41')
|
||||
expect(environment.frontend_version).toBe('1.24.0-1')
|
||||
expect(environment.python_version).toBe('3.12.11')
|
||||
expect(environment.available_accelerators).toContain('Metal')
|
||||
expect(environment.available_accelerators).toContain('CPU')
|
||||
expect(environment.primary_accelerator).toBe('Metal')
|
||||
@@ -196,7 +193,6 @@ describe.skip('useConflictDetection with Registry Store', () => {
|
||||
|
||||
expect(environment.comfyui_version).toBe('unknown')
|
||||
expect(environment.frontend_version).toBe('1.24.0-1')
|
||||
expect(environment.python_version).toBe('unknown')
|
||||
expect(environment.available_accelerators).toEqual(['CPU'])
|
||||
})
|
||||
})
|
||||
@@ -325,7 +321,7 @@ describe.skip('useConflictDetection with Registry Store', () => {
|
||||
expect(unknownPackage.conflicts).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
type: 'security_pending',
|
||||
type: 'pending',
|
||||
current_value: 'no_registry_data',
|
||||
required_value: 'registry_data_available'
|
||||
})
|
||||
@@ -1001,7 +997,6 @@ describe.skip('useConflictDetection with Registry Store', () => {
|
||||
mockSystemStatsStore.systemStats = {
|
||||
system: {
|
||||
comfyui_version: '0.3.41',
|
||||
python_version: '3.12.11',
|
||||
os: 'Darwin'
|
||||
},
|
||||
devices: []
|
||||
|
||||
@@ -17,7 +17,7 @@ describe('useConflictDetectionStore', () => {
|
||||
is_compatible: false,
|
||||
conflicts: [
|
||||
{
|
||||
type: 'security_pending',
|
||||
type: 'pending',
|
||||
current_value: 'no_registry_data',
|
||||
required_value: 'registry_data_available'
|
||||
}
|
||||
@@ -130,7 +130,7 @@ describe('useConflictDetectionStore', () => {
|
||||
})
|
||||
|
||||
describe('securityPendingPackages', () => {
|
||||
it('should filter packages with security_pending conflicts', () => {
|
||||
it('should filter packages with pending conflicts', () => {
|
||||
const store = useConflictDetectionStore()
|
||||
store.setConflictedPackages(mockConflictedPackages)
|
||||
|
||||
@@ -234,7 +234,7 @@ describe('useConflictDetectionStore', () => {
|
||||
required_value: 'not_banned'
|
||||
},
|
||||
{
|
||||
type: 'security_pending',
|
||||
type: 'pending',
|
||||
current_value: 'no_registry_data',
|
||||
required_value: 'registry_data_available'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user