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 b54c3c17c..f08998e6c 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 @@ -550,8 +550,8 @@ export function registerChatComposerControlTests() { // 以落盘后的回读值为准。 await waitFor(() => { expect( - (within(surface).getByLabelText('推理档') as HTMLSelectElement).value, - ).toBe('low'); + within(surface).getByRole('button', { name: '推理档' }).textContent, + ).toContain('低'); }); expect(stored).toBe('low'); // 只影响后续回合:当前没有发出任何新一轮直接对话。 diff --git a/apps/ai-game-creator-shell/tests/appSurface/project-commands.suite.ts b/apps/ai-game-creator-shell/tests/appSurface/project-commands.suite.ts index de8a13ca7..75a4be7a1 100644 --- a/apps/ai-game-creator-shell/tests/appSurface/project-commands.suite.ts +++ b/apps/ai-game-creator-shell/tests/appSurface/project-commands.suite.ts @@ -3815,7 +3815,9 @@ export function registerProjectCommandTests() { element.textContent?.trim() === 'game/index.html', ), ).not.toBeNull(); - expect(screen.getByText(/^assets\/uploads\/hero\.png$/)).not.toBeNull(); + expect( + screen.getAllByText(/^assets\/uploads\/hero\.png$/).length, + ).toBeGreaterThan(0); expect(invoke).toHaveBeenCalledWith('list_local_project_files', { projectPath: '/tmp/authorized-game', }); 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 1ffd98dc2..8c4b44ab7 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 @@ -145,7 +145,7 @@ export function registerToolCallGroupTests() { within(rows[0] as HTMLElement).getByText('npm run build'), ).not.toBeNull(); expect( - within(rows[1] as HTMLElement).getByText('game/src/hero.ts'), + within(rows[1] as HTMLElement).getAllByText('game/src/hero.ts')[0], ).not.toBeNull(); // 已结束回合里的 running 残留快照不能继续显示「执行中」。 expect(within(rows[1] as HTMLElement).getByText('已执行')).not.toBeNull();