From 8b2afb95820fe1bb7453b10983c01d61249c6b27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Wed, 22 Jul 2026 16:38:37 +0800 Subject: [PATCH] fix outdated test --- .../EditorAgentConversationPanelView.test.tsx | 10 ++++++---- .../useEditorAgentConversation.test.tsx | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/image-editor/EditorAgentConversation/EditorAgentConversationPanelView.test.tsx b/src/components/image-editor/EditorAgentConversation/EditorAgentConversationPanelView.test.tsx index 996578e9e..923daee72 100644 --- a/src/components/image-editor/EditorAgentConversation/EditorAgentConversationPanelView.test.tsx +++ b/src/components/image-editor/EditorAgentConversation/EditorAgentConversationPanelView.test.tsx @@ -218,7 +218,7 @@ describe('EditorAgentConversationPanelView', () => { { id: 'layer-1', resourceId: 'resource-1', - title: '一二三四五六七八九十甲乙', + title: '一二三四五六七八九十甲乙丙丁戊己庚辛壬癸子丑寅卯辰巳', src: '/generated/role.png', x: 0, y: 0, @@ -284,13 +284,15 @@ describe('EditorAgentConversationPanelView', () => { ).toBeNull(); fireEvent.click( within(attachmentDialog).getByRole('checkbox', { - name: '选择画布图片 一二三四五六七八九十', + name: '选择画布图片 一二三四五六七八九十甲乙丙丁戊己庚辛壬癸子丑寅卯', }), ); fireEvent.click( within(attachmentDialog).getByRole('button', { name: '应用' }), ); - expect(screen.getByText('一二三四五六七八九十')).toBeTruthy(); + expect( + screen.getByText('一二三四五六七八九十甲乙丙丁戊己庚辛壬癸子丑寅卯'), + ).toBeTruthy(); fireEvent.change(screen.getByLabelText('发送给画布 Agent'), { target: { value: '参考附件做像素风' }, @@ -308,7 +310,7 @@ describe('EditorAgentConversationPanelView', () => { expect.objectContaining({ source: 'canvas_resource', referenceId: 'resource-1', - label: '一二三四五六七八九十', + label: '一二三四五六七八九十甲乙丙丁戊己庚辛壬癸子丑寅卯', }), ], }), diff --git a/src/components/image-editor/EditorAgentConversation/useEditorAgentConversation.test.tsx b/src/components/image-editor/EditorAgentConversation/useEditorAgentConversation.test.tsx index a8577a518..d50e29f2a 100644 --- a/src/components/image-editor/EditorAgentConversation/useEditorAgentConversation.test.tsx +++ b/src/components/image-editor/EditorAgentConversation/useEditorAgentConversation.test.tsx @@ -551,7 +551,7 @@ describe('useEditorAgentConversation', () => { referenceId: 'resource-1', objectKey: 'generated-editor-assets/resource-1.png', imageSrc: '/resource-1.png', - label: '一二三四五六七八九十甲乙', + label: '一二三四五六七八九十甲乙丙丁戊己庚辛壬癸子丑寅卯辰巳', }), ]); }); @@ -564,7 +564,7 @@ describe('useEditorAgentConversation', () => { expect.objectContaining({ source: 'canvas_resource', referenceId: 'resource-1', - label: '一二三四五六七八九十', + label: '一二三四五六七八九十甲乙丙丁戊己庚辛壬癸子丑寅卯', }), ], }),