Browse Source

Keep image point multiplier regression meaningful

The image-count pricing regression was passing an override into a helper that ignored it, so the test exercised the one-image default while expecting the four-image total. This makes the fixture accept the same node data overrides as the lower-level image node factory without touching production pricing logic.

Constraint: Remote master already contains the UI change that hides unimplemented image toolbar actions.

Rejected: Change GenerationComposer point calculation | the failing evidence showed draft.imageCount was never set by the fixture.

Confidence: high

Scope-risk: narrow

Tested: npm run test:run -- src/components/__tests__/ImageInputNode.test.tsx src/app/api/generate/providers/__tests__/newapiwg.test.ts src/app/api/points/estimate/__tests__/route.test.ts src/components/__tests__/GenerationComposer.test.tsx src/store/execution/__tests__/generateVideoExecutor.test.ts

Tested: npm run build

Tested: git diff --check
TEST-s
jiajia 2 months ago
parent
commit
40f1236550
  1. 3
      src/components/__tests__/GenerationComposer.test.tsx

3
src/components/__tests__/GenerationComposer.test.tsx

@ -120,7 +120,7 @@ function imageNode(id: string, selected = false, data: Partial<NanoBananaNodeDat
} as WorkflowNode; } as WorkflowNode;
} }
function pricedImageNode(id: string, selected = false): WorkflowNode { function pricedImageNode(id: string, selected = false, data: Partial<NanoBananaNodeData> = {}): WorkflowNode {
return imageNode(id, selected, { return imageNode(id, selected, {
selectedModel: { selectedModel: {
provider: "newapiwg", provider: "newapiwg",
@ -129,6 +129,7 @@ function pricedImageNode(id: string, selected = false): WorkflowNode {
capabilities: ["text-to-image", "image-to-image"], capabilities: ["text-to-image", "image-to-image"],
pricing: { type: "per-run", amount: 2 }, pricing: { type: "per-run", amount: 2 },
}, },
...data,
}); });
} }

Loading…
Cancel
Save