diff --git a/apps/ai-game-creator-shell/tests/appSurface/project-development.suite.ts b/apps/ai-game-creator-shell/tests/appSurface/project-development.suite.ts index c1fa4e352..58d784dd4 100644 --- a/apps/ai-game-creator-shell/tests/appSurface/project-development.suite.ts +++ b/apps/ai-game-creator-shell/tests/appSurface/project-development.suite.ts @@ -7806,9 +7806,9 @@ export function registerProjectSupervisorSurfaceTests() { ); await waitFor(() => expect( - within(within(supervisorSurface).getByTestId('turn-process')).getByText( - '需求已接收', - ), + within( + within(supervisorSurface).getByTestId('agent-tool-call-group'), + ).getByText('需求已接收'), ).not.toBeNull(), ); const directMessageList = @@ -7818,8 +7818,9 @@ export function registerProjectSupervisorSurfaceTests() { scrollHeight: { configurable: true, value: 640 }, scrollTop: { configurable: true, value: 0, writable: true }, }); - const waitingProcessCard = - within(directMessageList).getByTestId('turn-process'); + const waitingProcessCard = within(directMessageList).getByTestId( + 'agent-tool-call-group', + ); expect(waitingProcessCard.parentElement).toBe(directMessageList); expect( within(waitingProcessCard).getByText('正在等待陶泥儿开始'), @@ -7871,8 +7872,9 @@ export function registerProjectSupervisorSurfaceTests() { }, }); }); - const thinkingProcessCard = - within(directMessageList).getByTestId('turn-process'); + const thinkingProcessCard = within(directMessageList).getByTestId( + 'agent-tool-call-group', + ); expect(within(thinkingProcessCard).getByText('任务执行中')).not.toBeNull(); expect( within(thinkingProcessCard).getByLabelText('陶泥儿正在执行的内容') @@ -7891,8 +7893,9 @@ export function registerProjectSupervisorSurfaceTests() { }, }); }); - const runningProcessCard = - within(directMessageList).getByTestId('turn-process'); + const runningProcessCard = within(directMessageList).getByTestId( + 'agent-tool-call-group', + ); expect(within(runningProcessCard).getByText('任务执行中')).not.toBeNull(); expect( within(runningProcessCard).getByRole('button', { name: '展开' }), @@ -7947,8 +7950,9 @@ export function registerProjectSupervisorSurfaceTests() { }); supervisorHarness.emitProgress('direct', '旧 fallback 不能覆盖精确事件'); }); - const streamingProcessCard = - within(directMessageList).getByTestId('turn-process'); + const streamingProcessCard = within(directMessageList).getByTestId( + 'agent-tool-call-group', + ); expect(within(streamingProcessCard).getByText('回复生成中')).not.toBeNull(); expect( within(streamingProcessCard).getByLabelText('陶泥儿正在执行的内容') @@ -8065,7 +8069,7 @@ export function registerProjectSupervisorSurfaceTests() { ), ).toBeNull(); expect( - within(directMessageList).queryByTestId('turn-process'), + within(directMessageList).queryByTestId('agent-tool-call-group'), ).toBeNull(); }); await waitFor(() => { @@ -8122,8 +8126,9 @@ export function registerProjectSupervisorSurfaceTests() { }, }); }); - const failedTurnProcessCard = - within(directMessageList).getByTestId('turn-process'); + const failedTurnProcessCard = within(directMessageList).getByTestId( + 'agent-tool-call-group', + ); expect( within(failedTurnProcessCard).getByText('回复生成中'), ).not.toBeNull(); @@ -8150,8 +8155,9 @@ export function registerProjectSupervisorSurfaceTests() { expect( within(supervisorSurface).queryByLabelText('陶泥儿实时回复'), ).toBeNull(); - const failedStatusProcessCard = - within(directMessageList).getByTestId('turn-process'); + const failedStatusProcessCard = within(directMessageList).getByTestId( + 'agent-tool-call-group', + ); expect( within(failedStatusProcessCard).getByText('处理失败'), ).not.toBeNull(); @@ -8167,7 +8173,7 @@ export function registerProjectSupervisorSurfaceTests() { within(supervisorSurface).queryByLabelText('陶泥儿实时回复'), ).toBeNull(); expect( - within(directMessageList).queryByTestId('turn-process'), + within(directMessageList).queryByTestId('agent-tool-call-group'), ).toBeNull(); expect( ( diff --git a/apps/ai-game-creator-shell/tests/appSurface/tool-call-group.suite.ts b/apps/ai-game-creator-shell/tests/appSurface/tool-call-group.suite.ts index de4d266cc..1ffd98dc2 100644 --- a/apps/ai-game-creator-shell/tests/appSurface/tool-call-group.suite.ts +++ b/apps/ai-game-creator-shell/tests/appSurface/tool-call-group.suite.ts @@ -209,7 +209,7 @@ export function registerToolCallGroupTests() { `#${fileHead.getAttribute('aria-controls')}`, ); expect( - within(fileDetail as HTMLElement).getByText('game/src/hero.ts'), + within(fileDetail as HTMLElement).getAllByText('game/src/hero.ts')[0], ).not.toBeNull(); expect(within(fileDetail as HTMLElement).getByText('新增')).not.toBeNull();