From 3a6109dce6d27f0b2faa56d9e591771f962c03eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Thu, 3 Sep 2026 19:51:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20UI=20=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E9=9A=94=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 卸载 ExclusiveChildrenTabs 测试实例,避免后续 tab 查询命中残留 DOM。 --- apps/ai-game-creator-shell/tests/uiEditorPreview.test.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/ai-game-creator-shell/tests/uiEditorPreview.test.tsx b/apps/ai-game-creator-shell/tests/uiEditorPreview.test.tsx index 4fee75539..96b3b5231 100644 --- a/apps/ai-game-creator-shell/tests/uiEditorPreview.test.tsx +++ b/apps/ai-game-creator-shell/tests/uiEditorPreview.test.tsx @@ -286,7 +286,7 @@ describe('UI tree preview visibility', () => { it('uses a highlighted tab bar for exclusive child switching', () => { const parent = exclusiveNode('parent', [node('child-a'), node('child-b')]); const onSelectChild = vi.fn(); - render( + const rendered = render( nodeId === 'child-a'} @@ -306,6 +306,7 @@ describe('UI tree preview visibility', () => { ).toBe('false'); fireEvent.click(screen.getByRole('tab', { name: 'child-b' })); expect(onSelectChild).toHaveBeenCalledWith('child-b'); + rendered.unmount(); }); it('keeps exclusive tab pointer gestures out of the parent node', () => {