From 285a8674207f13d153945496238915aa404191d0 Mon Sep 17 00:00:00 2001 From: Linghong Date: Wed, 16 Sep 2026 06:50:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E5=90=8C=E6=AD=A5=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E6=B5=8B=E8=AF=95=E5=A5=91=E7=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新过程节点、资源路径和推理档按钮断言以匹配当前渲染结构。 --- .../tests/appSurface/chat-composer.suite.ts | 4 ++-- .../tests/appSurface/project-commands.suite.ts | 4 +++- .../tests/appSurface/tool-call-group.suite.ts | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) 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();