From 68e879907aeb1ba8bb8a3896bd71758748909dd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Sat, 8 Aug 2026 16:16:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B8=B8=E6=88=8F=E5=88=9B?= =?UTF-8?q?=E4=BD=9C=E6=B8=85=E5=8D=95=E4=BA=8B=E4=BB=B6=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E6=97=B6=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 先等待 manifest 失效事件监听完成后再记录调用基线。 避免把打开项目后的最近项目复检误判为 Runtime 事件重新打开。 --- .../tests/appSurface/home.suite.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 dc4d77327..f8038aee6 100644 --- a/apps/ai-game-creator-shell/tests/appSurface/home.suite.ts +++ b/apps/ai-game-creator-shell/tests/appSurface/home.suite.ts @@ -296,6 +296,12 @@ export function registerClientHomeTests() { expect( screen.queryByRole('button', { name: /runtime-live-hero\.png/ }), ).toBeNull(); + await waitFor(() => { + expect(runtimeHarness.listen).toHaveBeenCalledWith( + 'game-creator-manifest-invalidated', + expect.any(Function), + ); + }); const manifestReadsBeforeEvent = invoke.mock.calls.filter( ([command]) => command === 'get_local_game_manifest', ).length; @@ -303,12 +309,6 @@ export function registerClientHomeTests() { ([command]) => command === 'inspect_local_project_directory', ).length; - await waitFor(() => { - expect(runtimeHarness.listen).toHaveBeenCalledWith( - 'game-creator-manifest-invalidated', - expect.any(Function), - ); - }); manifestChanged = true; act(() => { runtimeHarness.emitManifestInvalidated('art-asset-plan');