修复 UI 预览测试隔离
卸载 ExclusiveChildrenTabs 测试实例,避免后续 tab 查询命中残留 DOM。
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user