mirror of
https://github.com/rookiestar28/ComfyUI-OpenClaw.git
synced 2026-08-14 08:52:45 +00:00
feat(models): align managed folder type parity
This commit is contained in:
@@ -188,6 +188,11 @@ export const ModelManagerTab = {
|
||||
<option value="clip_vision">clip_vision</option>
|
||||
<option value="style_models">style_models</option>
|
||||
<option value="upscale_models">upscale_models</option>
|
||||
<option value="gligen">gligen</option>
|
||||
<option value="latent_upscale_models">latent_upscale_models</option>
|
||||
<option value="hypernetworks">hypernetworks</option>
|
||||
<option value="photomaker">photomaker</option>
|
||||
<option value="model_patches">model_patches</option>
|
||||
<option value="audio_encoders">audio_encoders</option>
|
||||
<option value="background_removal">background_removal</option>
|
||||
<option value="frame_interpolation">frame_interpolation</option>
|
||||
|
||||
@@ -88,4 +88,46 @@ describe("model_manager_tab", () => {
|
||||
expect.objectContaining({ task_id: "task-1", state: "completed" }),
|
||||
]);
|
||||
});
|
||||
|
||||
it("lists only managed-install supported current ComfyUI folder keys", async () => {
|
||||
apiMock.searchModels.mockResolvedValue({
|
||||
ok: true,
|
||||
data: { items: [] },
|
||||
});
|
||||
apiMock.listModelDownloadTasks.mockResolvedValue({
|
||||
ok: true,
|
||||
data: { tasks: [] },
|
||||
});
|
||||
apiMock.listModelInstallations.mockResolvedValue({
|
||||
ok: true,
|
||||
data: { installations: [] },
|
||||
});
|
||||
|
||||
const container = document.createElement("div");
|
||||
ModelManagerTab.render(container);
|
||||
await vi.waitFor(() => {
|
||||
expect(apiMock.searchModels).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
const options = Array.from(container.querySelectorAll("#mm-type option")).map(
|
||||
(option) => option.value
|
||||
);
|
||||
|
||||
expect(options).toEqual(expect.arrayContaining([
|
||||
"text_encoders",
|
||||
"diffusion_models",
|
||||
"gligen",
|
||||
"latent_upscale_models",
|
||||
"hypernetworks",
|
||||
"photomaker",
|
||||
"model_patches",
|
||||
"geometry_estimation",
|
||||
"optical_flow",
|
||||
"detection",
|
||||
]));
|
||||
expect(options).not.toContain("configs");
|
||||
expect(options).not.toContain("diffusers");
|
||||
expect(options).not.toContain("classifiers");
|
||||
expect(options).not.toContain("custom_nodes");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user