diff --git a/src/components/image-editor/ImageCanvasGenerationComposerView.test.tsx b/src/components/image-editor/ImageCanvasGenerationComposerView.test.tsx index 93079c042..0e07f44d1 100644 --- a/src/components/image-editor/ImageCanvasGenerationComposerView.test.tsx +++ b/src/components/image-editor/ImageCanvasGenerationComposerView.test.tsx @@ -961,13 +961,20 @@ describe('ImageCanvasGenerationComposerView', () => { '.image-canvas-editor__generation-composer-footer', ); expect(footer).toBeTruthy(); + // 底部一行:左侧一键优化与时长、循环,右侧 ElevenLabs + 生成。 expect(footer?.children[0]?.className).toContain( + 'image-canvas-editor__sound-effect-prompt-actions', + ); + expect(footer?.children[1]?.className).toContain( 'image-canvas-editor__option-popover-anchor--dimensions', ); expect(footer?.children[2]?.className).toContain( - 'image-canvas-editor__option-popover-anchor--model', + 'image-canvas-editor__sound-effect-loop', ); expect(footer?.children[3]?.className).toContain( + 'image-canvas-editor__option-popover-anchor--model', + ); + expect(footer?.children[4]?.className).toContain( 'image-canvas-editor__generation-submit', ); const prompt = within(panel).getByRole('textbox', { name: 'prompt' }); @@ -988,7 +995,7 @@ describe('ImageCanvasGenerationComposerView', () => { expect(within(panel).queryByText('单次')).toBeNull(); expect( within(panel) - .getByRole('button', { name: 'Loop' }) + .getByRole('button', { name: '循环 关' }) .getAttribute('aria-pressed'), ).toBe('false'); expect(within(panel).queryByText(/BPM/u)).toBeNull(); @@ -1034,7 +1041,7 @@ describe('ImageCanvasGenerationComposerView', () => { expect(screen.getByLabelText('当前音效时长').textContent).toBe('8'); expect(screen.getByRole('button', { name: '音效时长 8秒' })).toBeTruthy(); - fireEvent.click(within(panel).getByRole('button', { name: 'Loop' })); + fireEvent.click(within(panel).getByRole('button', { name: '循环 关' })); fireEvent.submit(panel); expect(onSubmitImageGeneration).toHaveBeenCalledWith( @@ -1082,7 +1089,7 @@ describe('ImageCanvasGenerationComposerView', () => { '一键优化', '撤销', '音效时长 5秒', - 'Loop', + '循环 关', '生成游戏音效', ]) { expect( diff --git a/src/components/image-editor/ImageCanvasGenerationComposerView.tsx b/src/components/image-editor/ImageCanvasGenerationComposerView.tsx index 0086e4b35..a2ec9942e 100644 --- a/src/components/image-editor/ImageCanvasGenerationComposerView.tsx +++ b/src/components/image-editor/ImageCanvasGenerationComposerView.tsx @@ -1,10 +1,12 @@ import { Check, ChevronDown, + Clock, Cpu, Film, ImageIcon, Music, + Repeat, Sparkles, Undo2, WandSparkles, @@ -1183,7 +1185,7 @@ function ImageCanvasAudioGenerationComposerView({ return (