hotfix: quick test updates for sora2 pricing badge. (#5966)

## Summary

Update expectations post-merge.

See https://github.com/Comfy-Org/ComfyUI_frontend/pull/5958
This commit is contained in:
Alexander Brown
2025-10-07 17:14:43 -07:00
committed by GitHub
parent 34d5a4523a
commit 0616c049e4

View File

@@ -316,14 +316,14 @@ describe('useNodePricing', () => {
{ name: 'duration', value: 'oops' },
{ name: 'size', value: '720x1280' }
])
expect(getNodeDisplayPrice(nodeNaN)).toBe('Set duration (4/8/12)')
expect(getNodeDisplayPrice(nodeNaN)).toBe('Set model, duration & size')
const nodeZero = createMockNode('OpenAIVideoSora2', [
{ name: 'model', value: 'sora-2-pro' },
{ name: 'duration', value: 0 },
{ name: 'size', value: '720x1280' }
])
expect(getNodeDisplayPrice(nodeZero)).toBe('Set duration (4/8/12)')
expect(getNodeDisplayPrice(nodeZero)).toBe('Set model, duration & size')
})
it('should require size when size is missing', () => {
@@ -332,9 +332,7 @@ describe('useNodePricing', () => {
{ name: 'model', value: 'sora-2-pro' },
{ name: 'duration', value: 8 }
])
expect(getNodeDisplayPrice(node)).toBe(
'Set size (720x1280, 1280x720, 1024x1792, 1792x1024)'
)
expect(getNodeDisplayPrice(node)).toBe('Set model, duration & size')
})
it('should compute pricing for sora-2-pro with 1024x1792', () => {
@@ -365,7 +363,7 @@ describe('useNodePricing', () => {
{ name: 'size', value: '640x640' }
])
expect(getNodeDisplayPrice(node)).toBe(
'Size must be 720x1280, 1280x720, 1024x1792, or 1792x1024'
'Invalid size. Must be 720x1280, 1280x720, 1024x1792, or 1792x1024.'
)
})