From 7b3b050b4790692869e2de6ba6b89013a028d4af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Fri, 4 Sep 2026 16:17:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=8D=E7=94=A8=E9=A1=B9=E7=9B=AE=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E6=B6=88=E6=81=AF=E6=B0=94=E6=B3=A1=E6=96=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 统一 Agent 对话与私有记忆消息的气泡查找 移除重复的空值断言并保留明确错误信息 --- .../assert-project-and-design-shortcuts.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/apps/ai-game-creator-shell/tests/appSurface/project-preview/preview-shortcuts/assert-project-and-design-shortcuts.ts b/apps/ai-game-creator-shell/tests/appSurface/project-preview/preview-shortcuts/assert-project-and-design-shortcuts.ts index 3f718cda2..8c3a9490d 100644 --- a/apps/ai-game-creator-shell/tests/appSurface/project-preview/preview-shortcuts/assert-project-and-design-shortcuts.ts +++ b/apps/ai-game-creator-shell/tests/appSurface/project-preview/preview-shortcuts/assert-project-and-design-shortcuts.ts @@ -61,9 +61,8 @@ export async function assertProjectAndDesignShortcutFlow( submitChat('/agent-conversations'); const agentConversationMessage = await screen.findByText('Agent 对话读取命令:'); - const agentConversationBubble = agentConversationMessage.closest('.message'); - expect(agentConversationBubble).not.toBeNull(); - expect(agentConversationBubble?.textContent).toContain( + const agentConversationBubble = messageBubble(agentConversationMessage); + expect(agentConversationBubble.textContent).toContain( '美术组 / Asset · 生成首版美术素材:/read .agent/conversations/agents/art-asset-plan.jsonl', ); fireEvent.click(screen.getByRole('button', { name: '读取拆解创作方向对话' })); @@ -80,9 +79,8 @@ export async function assertProjectAndDesignShortcutFlow( submitChat('/agent-memories'); const agentMemoryMessage = await screen.findByText('Agent 私有记忆读取命令:'); - const agentMemoryBubble = agentMemoryMessage.closest('.message'); - expect(agentMemoryBubble).not.toBeNull(); - expect(agentMemoryBubble?.textContent).toContain( + const agentMemoryBubble = messageBubble(agentMemoryMessage); + expect(agentMemoryBubble.textContent).toContain( '美术组 / Asset · 生成首版美术素材:/read memory/agents/art/asset.md', ); fireEvent.click(screen.getByRole('button', { name: '读取拆解创作方向记忆' }));