mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
test: add failing test for ModelInfoPanel showing wrong filename
When user_metadata.filename differs from asset.name, the Model Info panel should display the metadata filename. Currently it always shows asset.name regardless.
This commit is contained in:
@@ -61,6 +61,15 @@ describe('ModelInfoPanel', () => {
|
||||
expect(wrapper.text()).toContain('my-model.safetensors')
|
||||
})
|
||||
|
||||
it('prefers user_metadata.filename over asset.name for filename field', () => {
|
||||
const asset = createMockAsset({
|
||||
name: 'registry-display-name',
|
||||
user_metadata: { filename: 'checkpoints/real-file.safetensors' }
|
||||
})
|
||||
const wrapper = mountPanel(asset)
|
||||
expect(wrapper.text()).toContain('checkpoints/real-file.safetensors')
|
||||
})
|
||||
|
||||
it('displays name from user_metadata when present', () => {
|
||||
const asset = createMockAsset({
|
||||
user_metadata: { name: 'My Custom Model' }
|
||||
|
||||
Reference in New Issue
Block a user