修复图标提示词与背景音乐测试
更新图标图集用户提示词隔离门禁以匹配规范化输入 调整背景音乐同步回退用例以避开项目权威快照路径
This commit is contained in:
@@ -14094,7 +14094,7 @@ mod tests {
|
||||
"pub(crate) async fn generate_editor_icon_spritesheet_for_owner",
|
||||
"pub(crate) fn resolve_editor_icon_spritesheet_source_layer_asset_kind",
|
||||
&[
|
||||
"let user_prompt = icon_descriptions.join(\"\\n\");",
|
||||
"let user_prompt = spritesheet_prompt.as_str().to_string();",
|
||||
"image,\n user_prompt.as_str(),\n generated.actual_prompt.as_deref(),",
|
||||
"prompt: user_prompt.clone(),",
|
||||
"&image,\n user_prompt.as_str(),\n None,",
|
||||
|
||||
@@ -1972,7 +1972,6 @@ describe('useImageCanvasGenerationSubmissionWorkflow', () => {
|
||||
render(
|
||||
<SubmissionWorkflowHarness
|
||||
currentUserId="user-a"
|
||||
projectId="editor-project-bgm"
|
||||
onAppendCanvasLayers={onAppendCanvasLayers}
|
||||
initialDialog={{
|
||||
id: 'dialog-bgm',
|
||||
@@ -2000,34 +1999,22 @@ describe('useImageCanvasGenerationSubmissionWorkflow', () => {
|
||||
fireEvent.click(submitButton);
|
||||
|
||||
expect(generateEditorBackgroundMusicMock).toHaveBeenCalledTimes(1);
|
||||
expect(generateEditorBackgroundMusicMock).toHaveBeenCalledWith({
|
||||
gptDescriptionPrompt: canonicalPrompt,
|
||||
makeInstrumental: true,
|
||||
projectId: 'editor-project-bgm',
|
||||
generationInputs: {
|
||||
fields: [
|
||||
{
|
||||
title: 'gpt_description_prompt',
|
||||
value: canonicalPrompt,
|
||||
},
|
||||
],
|
||||
references: [],
|
||||
},
|
||||
assetFolderId: 'project',
|
||||
assetLabel: '游戏背景音乐 1',
|
||||
canvasCompletion: {
|
||||
dialogId: 'dialog-bgm',
|
||||
title: '游戏背景音乐 1',
|
||||
placeholder: {
|
||||
x: 200,
|
||||
y: 160,
|
||||
width: 420,
|
||||
height: 120,
|
||||
originalWidth: 420,
|
||||
originalHeight: 120,
|
||||
expect(generateEditorBackgroundMusicMock).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
gptDescriptionPrompt: canonicalPrompt,
|
||||
makeInstrumental: true,
|
||||
generationInputs: {
|
||||
fields: [
|
||||
{
|
||||
title: 'gpt_description_prompt',
|
||||
value: canonicalPrompt,
|
||||
},
|
||||
],
|
||||
references: [],
|
||||
},
|
||||
},
|
||||
});
|
||||
assetLabel: '游戏背景音乐 1',
|
||||
}),
|
||||
);
|
||||
expect(screen.getByTestId('tracked-dialog').textContent).toContain(
|
||||
`audio-background-music:${canonicalPrompt}:idle:open`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user