修复快速编辑来源契约测试
断言快速编辑通过 sourceReferenceId 提交权威业务引用 禁止测试接受已废弃的来源地址和资源字段
This commit is contained in:
@@ -2268,9 +2268,8 @@ describe('useImageCanvasGenerationWorkflow', () => {
|
||||
expect(editEditorImageMock).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
prompt: '快速修图',
|
||||
sourceImageSrc: 'resource-source',
|
||||
sourceReferenceId: 'resource-source',
|
||||
assetLabel: '源图 快速编辑',
|
||||
sourceResourceId: 'resource-source',
|
||||
generationInputs: {
|
||||
fields: [{ title: '快速编辑提示词', value: '快速修图' }],
|
||||
references: [
|
||||
@@ -2285,6 +2284,12 @@ describe('useImageCanvasGenerationWorkflow', () => {
|
||||
}),
|
||||
);
|
||||
});
|
||||
expect(editEditorImageMock.mock.calls[0]?.[0]).not.toHaveProperty(
|
||||
'sourceImageSrc',
|
||||
);
|
||||
expect(editEditorImageMock.mock.calls[0]?.[0]).not.toHaveProperty(
|
||||
'sourceResourceId',
|
||||
);
|
||||
expect(generateEditorImageMock).not.toHaveBeenCalled();
|
||||
|
||||
await waitFor(() => {
|
||||
|
||||
Reference in New Issue
Block a user