Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions tests-ui/tests/composables/node/useNodePricing.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand All @@ -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', () => {
Expand Down Expand Up @@ -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.'
)
})

Expand Down
Loading