From 12bbb0572d00d4e881a6fcdd458e2a2702ffe90f Mon Sep 17 00:00:00 2001 From: Will Miao Date: Sun, 29 Mar 2026 00:24:20 +0800 Subject: [PATCH] fix: Add missing mock for getMappableBaseModelsDynamic in tests (#854) - Add getMappableBaseModelsDynamic to constants.js mocks in test files - Remove refs/enums.json temporary file from repository Fixes test failures introduced in previous commit. --- refs/enums.json | 167 ------------------ ...ingsManager.downloadSkipBaseModels.test.js | 1 + .../managers/settingsManager.library.test.js | 1 + 3 files changed, 2 insertions(+), 167 deletions(-) delete mode 100644 refs/enums.json diff --git a/refs/enums.json b/refs/enums.json deleted file mode 100644 index 6a7559b6..00000000 --- a/refs/enums.json +++ /dev/null @@ -1,167 +0,0 @@ -{ - "ModelType": [ - "Checkpoint", - "TextualInversion", - "Hypernetwork", - "AestheticGradient", - "LORA", - "LoCon", - "DoRA", - "Controlnet", - "Upscaler", - "MotionModule", - "VAE", - "Poses", - "Wildcards", - "Workflows", - "Detection", - "Other" - ], - "ModelFileType": [ - "Model", - "Text Encoder", - "Pruned Model", - "Negative", - "Training Data", - "VAE", - "Config", - "Archive" - ], - "ActiveBaseModel": [ - "Anima", - "AuraFlow", - "Chroma", - "CogVideoX", - "Flux.1 S", - "Flux.1 D", - "Flux.1 Krea", - "Flux.1 Kontext", - "Flux.2 D", - "Flux.2 Klein 9B", - "Flux.2 Klein 9B-base", - "Flux.2 Klein 4B", - "Flux.2 Klein 4B-base", - "HiDream", - "Hunyuan 1", - "Hunyuan Video", - "Illustrious", - "Kolors", - "LTXV", - "LTXV2", - "LTXV 2.3", - "Lumina", - "Mochi", - "NoobAI", - "Other", - "PixArt a", - "PixArt E", - "Pony", - "Pony V7", - "Qwen", - "SD 1.4", - "SD 1.5", - "SD 1.5 LCM", - "SD 1.5 Hyper", - "SD 2.0", - "SD 2.1", - "SDXL 1.0", - "SDXL Lightning", - "SDXL Hyper", - "Wan Video 1.3B t2v", - "Wan Video 14B t2v", - "Wan Video 14B i2v 480p", - "Wan Video 14B i2v 720p", - "Wan Video 2.2 TI2V-5B", - "Wan Video 2.2 I2V-A14B", - "Wan Video 2.2 T2V-A14B", - "Wan Video 2.5 T2V", - "Wan Video 2.5 I2V", - "ZImageTurbo", - "ZImageBase" - ], - "BaseModel": [ - "Anima", - "AuraFlow", - "Chroma", - "CogVideoX", - "Flux.1 S", - "Flux.1 D", - "Flux.1 Krea", - "Flux.1 Kontext", - "Flux.2 D", - "Flux.2 Klein 9B", - "Flux.2 Klein 9B-base", - "Flux.2 Klein 4B", - "Flux.2 Klein 4B-base", - "HiDream", - "Hunyuan 1", - "Hunyuan Video", - "Illustrious", - "Imagen4", - "Kling", - "Kolors", - "LTXV", - "LTXV2", - "LTXV 2.3", - "Lumina", - "Mochi", - "Nano Banana", - "NoobAI", - "ODOR", - "OpenAI", - "Other", - "PixArt a", - "PixArt E", - "Playground v2", - "Pony", - "Pony V7", - "Qwen", - "Stable Cascade", - "SD 1.4", - "SD 1.5", - "SD 1.5 LCM", - "SD 1.5 Hyper", - "SD 2.0", - "SD 2.0 768", - "SD 2.1", - "SD 2.1 768", - "SD 2.1 Unclip", - "SD 3", - "SD 3.5", - "SD 3.5 Large", - "SD 3.5 Large Turbo", - "SD 3.5 Medium", - "Sora 2", - "SDXL 0.9", - "SDXL 1.0", - "SDXL 1.0 LCM", - "SDXL Lightning", - "SDXL Hyper", - "SDXL Turbo", - "SDXL Distilled", - "Seedance", - "Seedream", - "SVD", - "SVD XT", - "Veo 3", - "Vidu Q1", - "Wan Video", - "Wan Video 1.3B t2v", - "Wan Video 14B t2v", - "Wan Video 14B i2v 480p", - "Wan Video 14B i2v 720p", - "Wan Video 2.2 TI2V-5B", - "Wan Video 2.2 I2V-A14B", - "Wan Video 2.2 T2V-A14B", - "Wan Video 2.5 T2V", - "Wan Video 2.5 I2V", - "ZImageTurbo", - "ZImageBase" - ], - "BaseModelType": [ - "Standard", - "Inpainting", - "Refiner", - "Pix2Pix" - ] -} \ No newline at end of file diff --git a/tests/frontend/managers/settingsManager.downloadSkipBaseModels.test.js b/tests/frontend/managers/settingsManager.downloadSkipBaseModels.test.js index 4b41db95..1f41b090 100644 --- a/tests/frontend/managers/settingsManager.downloadSkipBaseModels.test.js +++ b/tests/frontend/managers/settingsManager.downloadSkipBaseModels.test.js @@ -39,6 +39,7 @@ vi.mock('../../../static/js/utils/constants.js', () => ({ checkpoint: 'base, guide', embedding: 'hint', }, + getMappableBaseModelsDynamic: () => ['Flux.1 D', 'Pony', 'SDXL 1.0', 'Other'], })); vi.mock('../../../static/js/utils/i18nHelpers.js', () => ({ diff --git a/tests/frontend/managers/settingsManager.library.test.js b/tests/frontend/managers/settingsManager.library.test.js index 98fcbf21..a2bb831d 100644 --- a/tests/frontend/managers/settingsManager.library.test.js +++ b/tests/frontend/managers/settingsManager.library.test.js @@ -42,6 +42,7 @@ vi.mock('../../../static/js/utils/constants.js', () => ({ checkpoint: 'base, guide', embedding: 'hint', }, + getMappableBaseModelsDynamic: () => [], })); vi.mock('../../../static/js/utils/i18nHelpers.js', () => ({