From 55259683b839d7d5d52a8191b8b043632f24a9d3 Mon Sep 17 00:00:00 2001 From: Suzumiya Date: Mon, 21 Sep 2026 00:28:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=A7=92=E8=89=B2=E5=8A=A8?= =?UTF-8?q?=E7=94=BB=E9=9D=A2=E6=9D=BF=E9=87=8C=E9=87=8D=E5=A4=8D=E5=9B=9E?= =?UTF-8?q?=E6=98=BE=E6=8F=90=E7=A4=BA=E8=AF=8D=E7=9A=84=E3=80=8C=E5=8A=A8?= =?UTF-8?q?=E7=94=BB=E6=8F=8F=E8=BF=B0=E3=80=8D=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 共享组件 ImageCanvasCharacterAnimationPanelView 不再渲染只读的生成文本回显(与上方输入区内容重复,且两个宿主都没有为它定义样式) - 用例同步:原断言「生成文本:…」改为钉住该节点不再渲染,并保留「输入区确实收下这段文本」的检查 --- .../ImageCanvasCharacterAnimationPanelView.tsx | 7 ------- .../ImageCanvasEditorGenerationIntegration.test.tsx | 8 ++++++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/components/image-editor/ImageCanvasCharacterAnimationPanelView.tsx b/src/components/image-editor/ImageCanvasCharacterAnimationPanelView.tsx index a9bd8d13d..505ef46c6 100644 --- a/src/components/image-editor/ImageCanvasCharacterAnimationPanelView.tsx +++ b/src/components/image-editor/ImageCanvasCharacterAnimationPanelView.tsx @@ -259,13 +259,6 @@ export function ImageCanvasCharacterAnimationPanelView({ {isGenerating ? '生成中' : `生成${price}泥点`} - - {panel.promptText.trim() ? panel.promptText.trim() : '动画描述'} - {panel.status === 'completed' && panel.result ? ( { within(panel).getByLabelText('动画描述'), precisePrompt, ); + // 面板里原本还有一行只读的「生成文本」回显(与上面的输入区重复);它已删除,这里钉住不再渲染。 expect( - within(panel).getByLabelText(`生成文本:${precisePrompt}`), - ).toBeTruthy(); + within(panel).queryByLabelText(`生成文本:${precisePrompt}`), + ).toBeNull(); + expect(within(panel).getByLabelText('动画描述').textContent).toContain( + precisePrompt, + ); fireEvent.click( within(panel).getByRole('button', { name: '动画参数 同图尺寸 · 4秒 · 480p',