修复 UI 预览测试隔离

卸载 ExclusiveChildrenTabs 测试实例,避免后续 tab 查询命中残留 DOM。
This commit is contained in:
2026-09-03 19:51:09 +08:00
parent 00c810c002
commit 3a6109dce6
@@ -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(
<ExclusiveChildrenTabs
parent={parent}
isChildVisible={(nodeId) => 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', () => {