From c6a08ef98f02f248ea9a76ceed2fd5db8ff6ab49 Mon Sep 17 00:00:00 2001 From: Linghong Date: Tue, 18 Aug 2026 09:35:28 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DM1D=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E6=96=87=E6=A1=88=E5=9B=9E=E5=BD=92=E6=96=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 同步立项入口与设计实现组展示文案的测试期望 恢复Frontend tests与Native shell tests中的前端测试覆盖 --- .../tests/agentTraceSummary.test.ts | 4 ++-- .../tests/appSurface/home.suite.ts | 2 +- .../tests/appSurface/project-assets.suite.ts | 24 ++++++------------- .../assert-planning-and-status-shortcuts.ts | 6 ++--- .../assert-project-and-design-shortcuts.ts | 4 ++-- .../assert-project-tools-and-preview.ts | 2 +- .../project-preview/run-status.suite.ts | 4 ++-- .../appSurface/supervisor-runtime.suite.ts | 2 +- 8 files changed, 19 insertions(+), 29 deletions(-) diff --git a/apps/ai-game-creator-shell/tests/agentTraceSummary.test.ts b/apps/ai-game-creator-shell/tests/agentTraceSummary.test.ts index 6b296af00..a49f3db21 100644 --- a/apps/ai-game-creator-shell/tests/agentTraceSummary.test.ts +++ b/apps/ai-game-creator-shell/tests/agentTraceSummary.test.ts @@ -251,7 +251,7 @@ describe('AI 游戏创作 Agent loop 摘要', () => { 'active 任务:程序组 / Director 拆解程序实现(code-director), 程序组 / Review 执行质量评审(quality-review), 运营组 / Publish 整理发布包装(publish-package)', ); expect(summary).toContain( - 'carry-over 任务:策划组 / Director 拆解创作方向(design-director)', + 'carry-over 任务:设计实现组 / Director 拆解创作方向(design-director)', ); expect(summary).toContain('返工焦点:gameHtml 缺少 canvas'); expect(summary).toContain( @@ -267,7 +267,7 @@ describe('AI 游戏创作 Agent loop 摘要', () => { expect(summary).toContain('还有 1 个建议命令'); expect(summary).toContain('编排轮次:'); expect(summary).toContain( - 'pass 2 · repair · active 程序组 / Director 拆解程序实现(code-director), 程序组 / Review 执行质量评审(quality-review), 运营组 / Publish 整理发布包装(publish-package) · carry 策划组 / Director 拆解创作方向(design-director) · waves 程序组 / Director 拆解程序实现(code-director) / 程序组 / Review 执行质量评审(quality-review) / 运营组 / Publish 整理发布包装(publish-package) · repair gameHtml 缺少 canvas · routes code-repair+dependency-impact: 程序组 / Director 拆解程序实现(code-director), 程序组 / Review 执行质量评审(quality-review), 程序组 / Preview 执行静态自检(preview-readiness), 运营组 / Publish 整理发布包装(publish-package)', + 'pass 2 · repair · active 程序组 / Director 拆解程序实现(code-director), 程序组 / Review 执行质量评审(quality-review), 运营组 / Publish 整理发布包装(publish-package) · carry 设计实现组 / Director 拆解创作方向(design-director) · waves 程序组 / Director 拆解程序实现(code-director) / 程序组 / Review 执行质量评审(quality-review) / 运营组 / Publish 整理发布包装(publish-package) · repair gameHtml 缺少 canvas · routes code-repair+dependency-impact: 程序组 / Director 拆解程序实现(code-director), 程序组 / Review 执行质量评审(quality-review), 程序组 / Preview 执行静态自检(preview-readiness), 运营组 / Publish 整理发布包装(publish-package)', ); expect(summary).not.toContain('pass 1 · initial'); expect(summary).toContain('还有 1 个较早轮次'); diff --git a/apps/ai-game-creator-shell/tests/appSurface/home.suite.ts b/apps/ai-game-creator-shell/tests/appSurface/home.suite.ts index 13fc0e0b4..8009291cf 100644 --- a/apps/ai-game-creator-shell/tests/appSurface/home.suite.ts +++ b/apps/ai-game-creator-shell/tests/appSurface/home.suite.ts @@ -1291,7 +1291,7 @@ export function registerHomeProjectCreationTests() { await waitFor(() => { expect(promptInput.textContent).toContain('做一个像素风横版游戏'); }); - const createButton = screen.getByRole('button', { name: '开启创作' }); + const createButton = screen.getByRole('button', { name: '进入立项策划' }); fireEvent.click(createButton); await waitFor(() => { diff --git a/apps/ai-game-creator-shell/tests/appSurface/project-assets.suite.ts b/apps/ai-game-creator-shell/tests/appSurface/project-assets.suite.ts index 2bf52d9da..1df0e257a 100644 --- a/apps/ai-game-creator-shell/tests/appSurface/project-assets.suite.ts +++ b/apps/ai-game-creator-shell/tests/appSurface/project-assets.suite.ts @@ -1110,9 +1110,9 @@ export function registerProjectAssetTests() { expect(await screen.findByText(/任务拆分:/)).not.toBeNull(); expect( - screen.getByText(/策划组 \/ Director:拆解创作方向 · 待处理/), + screen.getByText(/设计实现组 \/ Director:拆解创作方向 · 待处理/), ).not.toBeNull(); - expect(screen.getByText(/下一步:策划组 \/ Director/)).not.toBeNull(); + expect(screen.getByText(/下一步:设计实现组 \/ Director/)).not.toBeNull(); expect(invoke).toHaveBeenCalledWith('get_local_game_manifest', { projectPath: '/tmp/authorized-game', commandId: 'task.list', @@ -1191,9 +1191,7 @@ export function registerCanvasAssetTests() { submitChat('/project /tmp/authorized-game'); fireEvent.click(screen.getByRole('button', { name: '确认' })); - expect( - await screen.findByText('已打开:authorized-game'), - ).not.toBeNull(); + expect(await screen.findByText('已打开:authorized-game')).not.toBeNull(); submitChat( '/import-canvas-asset assets/hero.png canvas-project-1 object:asset-object-1 character image/png', @@ -1716,9 +1714,7 @@ export function registerCanvasAssetTests() { submitChat('/project /tmp/authorized-game'); fireEvent.click(screen.getByRole('button', { name: '确认' })); - expect( - await screen.findByText('已打开:authorized-game'), - ).not.toBeNull(); + expect(await screen.findByText('已打开:authorized-game')).not.toBeNull(); expect(await screen.findByText(/还没有最近一次 Agent run/)).not.toBeNull(); submitChat( @@ -1820,9 +1816,7 @@ export function registerCanvasAssetTests() { submitChat('/project /tmp/authorized-game'); fireEvent.click(screen.getByRole('button', { name: '确认' })); - expect( - await screen.findByText('已打开:authorized-game'), - ).not.toBeNull(); + expect(await screen.findByText('已打开:authorized-game')).not.toBeNull(); submitChat('/canvas bad\u0007canvas'); submitChat('/sync-canvas-project bad\u0007canvas'); @@ -2002,9 +1996,7 @@ export function registerCanvasAssetTests() { submitChat('/project /tmp/authorized-game'); fireEvent.click(screen.getByRole('button', { name: '确认' })); - expect( - await screen.findByText('已打开:authorized-game'), - ).not.toBeNull(); + expect(await screen.findByText('已打开:authorized-game')).not.toBeNull(); submitChat('/sync-canvas-project canvas-project-1'); fireEvent.click(screen.getByRole('button', { name: '确认' })); @@ -2089,9 +2081,7 @@ export function registerCanvasAssetTests() { submitChat('/project /tmp/authorized-game'); fireEvent.click(screen.getByRole('button', { name: '确认' })); - expect( - await screen.findByText('已打开:authorized-game'), - ).not.toBeNull(); + expect(await screen.findByText('已打开:authorized-game')).not.toBeNull(); submitChat('/generate-art 月光厨房弹幕主角'); expect(await screen.findByText('准备生成首版美术素材。')).not.toBeNull(); diff --git a/apps/ai-game-creator-shell/tests/appSurface/project-preview/preview-shortcuts/assert-planning-and-status-shortcuts.ts b/apps/ai-game-creator-shell/tests/appSurface/project-preview/preview-shortcuts/assert-planning-and-status-shortcuts.ts index d1d8fd730..d93100fa5 100644 --- a/apps/ai-game-creator-shell/tests/appSurface/project-preview/preview-shortcuts/assert-planning-and-status-shortcuts.ts +++ b/apps/ai-game-creator-shell/tests/appSurface/project-preview/preview-shortcuts/assert-planning-and-status-shortcuts.ts @@ -385,10 +385,10 @@ export async function assertPlanningAndStatusShortcutFlow( '状态:active 0 / carry 0 / ready 1 / 等待依赖 13', ); expect(dependencyMessage.textContent).toContain( - '美术组 / Asset 生成首版美术素材(art-asset-plan) · 等待:美术组 / Director 确定视觉方向与规范图(art-director);策划组 / Gameplay 确定玩法规格与界面原型(design-foundation)', + '美术组 / Asset 生成首版美术素材(art-asset-plan) · 等待:美术组 / Director 确定视觉方向与规范图(art-director);设计实现组 / Gameplay 确定玩法规格与界面原型(design-foundation)', ); expect(dependencyMessage.textContent).toContain( - '策划组 / Gameplay 确定玩法规格与界面原型(design-foundation) · 等待:策划组 / Director 拆解创作方向(design-director);美术组 / Director 确定视觉方向与规范图(art-director)', + '设计实现组 / Gameplay 确定玩法规格与界面原型(design-foundation) · 等待:设计实现组 / Director 拆解创作方向(design-director);美术组 / Director 确定视觉方向与规范图(art-director)', ); expect(dependencyMessage.textContent).toContain( '边界:只整理任务依赖;不读取任务文件;不启动 run;不修改项目', @@ -1439,7 +1439,7 @@ export async function assertPlanningAndStatusShortcutFlow( '美术组:ready · Asset 生成首版美术素材(art-asset-plan) · 验收:角色、场景、UI 和动画需求已映射到画板或本地资产,且至少一张首版核心素材图已生成并登记', ); expect(planMessage.textContent).toContain( - '空档组:策划组、程序组、数值组、音乐组、运营组', + '空档组:设计实现组、程序组、数值组、音乐组、运营组', ); expect(planMessage.textContent).toContain( '边界:只整理下一轮分工;不读取任务文件;不启动 run;不修改项目', 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 148a60272..97418c335 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 @@ -591,7 +591,7 @@ export async function assertProjectAndDesignShortcutFlow( '原型入口:game/index.html · 未见 trace 产物', ); expect(controlMessage.textContent).toContain( - 'design-foundation:策划组 / Gameplay 确定玩法规格与界面原型 · 待处理', + 'design-foundation:设计实现组 / Gameplay 确定玩法规格与界面原型 · 待处理', ); expect(controlMessage.textContent).toContain( 'code-prototype:程序组 / Code 生成可运行原型 · 待处理', @@ -1146,7 +1146,7 @@ export async function assertProjectAndDesignShortcutFlow( '当前证据:最近 run 已通过 run-main-shortcut-trace;预览 未启动;发布说明 已生成', ); expect(localizationMessage.textContent).toContain( - 'design-foundation:策划组 / Gameplay 确定玩法规格与界面原型 · 待处理', + 'design-foundation:设计实现组 / Gameplay 确定玩法规格与界面原型 · 待处理', ); expect(localizationMessage.textContent).toContain( 'code-prototype:程序组 / Code 生成可运行原型 · 待处理', diff --git a/apps/ai-game-creator-shell/tests/appSurface/project-preview/preview-shortcuts/assert-project-tools-and-preview.ts b/apps/ai-game-creator-shell/tests/appSurface/project-preview/preview-shortcuts/assert-project-tools-and-preview.ts index 4cc2e067f..ce71e30ed 100644 --- a/apps/ai-game-creator-shell/tests/appSurface/project-preview/preview-shortcuts/assert-project-tools-and-preview.ts +++ b/apps/ai-game-creator-shell/tests/appSurface/project-preview/preview-shortcuts/assert-project-tools-and-preview.ts @@ -561,7 +561,7 @@ export async function assertProjectToolsAndPreviewFlow( fireEvent.click(screen.getByRole('button', { name: '任务' })); expect(await screen.findByText(/任务拆分:/)).not.toBeNull(); - expect(screen.getByText(/下一步:策划组 \/ Director/)).not.toBeNull(); + expect(screen.getByText(/下一步:设计实现组 \/ Director/)).not.toBeNull(); fireEvent.click(screen.getByRole('button', { name: 'Trace' })); expect( diff --git a/apps/ai-game-creator-shell/tests/appSurface/project-preview/run-status.suite.ts b/apps/ai-game-creator-shell/tests/appSurface/project-preview/run-status.suite.ts index 8e57974d3..b100d0832 100644 --- a/apps/ai-game-creator-shell/tests/appSurface/project-preview/run-status.suite.ts +++ b/apps/ai-game-creator-shell/tests/appSurface/project-preview/run-status.suite.ts @@ -137,7 +137,7 @@ export function registerProjectRunStatusTests() { 'active: 程序组 / Code 生成可运行原型(code-prototype)', ); expect(screen.getByLabelText('Agent task graph').textContent).toContain( - 'carry-over: 策划组 / Director 拆解创作方向(design-director)', + 'carry-over: 设计实现组 / Director 拆解创作方向(design-director)', ); expect(screen.getByLabelText('Agent task graph').textContent).toContain( 'ready: 程序组 / Playtest 预览并试玩验收(preview-playtest)', @@ -146,7 +146,7 @@ export function registerProjectRunStatusTests() { 'route: 程序组 / Code 生成可运行原型(code-prototype), 程序组 / Review 执行质量评审(quality-review) · code-runtime', ); expect(screen.getByLabelText('Agent pass plans').textContent).toContain( - 'pass 1: repair · active 程序组 / Code 生成可运行原型(code-prototype), 程序组 / Review 执行质量评审(quality-review) · carry 策划组 / Director 拆解创作方向(design-director) · waves 程序组 / Code 生成可运行原型(code-prototype) / 程序组 / Review 执行质量评审(quality-review) · repair 缺少输入监听 · routes code-runtime: 程序组 / Code 生成可运行原型(code-prototype), 程序组 / Review 执行质量评审(quality-review)', + 'pass 1: repair · active 程序组 / Code 生成可运行原型(code-prototype), 程序组 / Review 执行质量评审(quality-review) · carry 设计实现组 / Director 拆解创作方向(design-director) · waves 程序组 / Code 生成可运行原型(code-prototype) / 程序组 / Review 执行质量评审(quality-review) · repair 缺少输入监听 · routes code-runtime: 程序组 / Code 生成可运行原型(code-prototype), 程序组 / Review 执行质量评审(quality-review)', ); expect(screen.getByLabelText('Agent artifacts').textContent).toContain( 'exports/artifact-8.json', diff --git a/apps/ai-game-creator-shell/tests/appSurface/supervisor-runtime.suite.ts b/apps/ai-game-creator-shell/tests/appSurface/supervisor-runtime.suite.ts index 90b369c18..6dd7b03a1 100644 --- a/apps/ai-game-creator-shell/tests/appSurface/supervisor-runtime.suite.ts +++ b/apps/ai-game-creator-shell/tests/appSurface/supervisor-runtime.suite.ts @@ -1833,7 +1833,7 @@ export function registerSupervisorRuntimeTests() { /active 任务:程序组 \/ Director 拆解程序实现\(code-director\), 程序组 \/ Code 生成可运行原型\(code-prototype\), 程序组 \/ Review 执行质量评审\(quality-review\), 程序组 \/ Preview 执行静态自检\(preview-readiness\)/, ), ).not.toBeNull(); - expect(screen.getByText(/carry-over 任务:策划组/)).not.toBeNull(); + expect(screen.getByText(/carry-over 任务:设计实现组/)).not.toBeNull(); expect(screen.getByText(/返工焦点:缺少输入监听/)).not.toBeNull(); expect( screen.getByText(/agent\.tool\.suggest\.canvas\.project_sync/),