diff --git a/apps/ai-game-creator-shell/tests/appSurface/chat-composer.suite.ts b/apps/ai-game-creator-shell/tests/appSurface/chat-composer.suite.ts index e2283ab9e..ed3a94467 100644 --- a/apps/ai-game-creator-shell/tests/appSurface/chat-composer.suite.ts +++ b/apps/ai-game-creator-shell/tests/appSurface/chat-composer.suite.ts @@ -598,10 +598,13 @@ export function registerChatComposerControlTests() { expect( within(surface).getByRole('button', { name: '发送' }), ).not.toBeNull(); - // 命令返回那条通道只负责横幅:它不写第二条聊天文案。 + // 命令返回那条通道只负责横幅:它不写第二条聊天文案。真失败时 `runTurn` 会先把原始错误 + // 映射成通用可见文案再走横幅(横幅在头部的状态行,不在会话列表里),所以这里查映射后的 + // 文案有没有出现在会话列表里,而不是那条永远不会被渲染的原始错误文本。 + const conversation = within(surface).getByLabelText('陶泥儿消息'); expect( - within(surface).queryAllByText( - '模拟宿主失败:错误只走终态事件,命令只回报失败', + within(conversation).queryAllByText( + '陶泥儿智能创作 执行失败,请稍后重试', ), ).toHaveLength(0); });