import React from 'react'; import { composeStories } from '@storybook/react-vite'; import { render as testRender } from '../../../vitest/render'; import * as stories from './Tree.stories'; const composedStories = composeStories(stories); describe('Tree Story Snapshots', () => { it('has tests for all stories', () => { const storyNames = Object.keys(composedStories); const testedStories = new Set([ 'Basic', 'DeeplyNested', 'SelectionUncontrolled', 'SelectionControlled', 'SelectionScopeChildren', 'SelectionScopeParents', 'ExpansionUncontrolled', 'ExpansionControlled', 'CustomActions', 'CustomActionsLargeDataset', 'LazyLoadingUncontrolled', 'LazyLoadingSubtree', 'LazyLoadingControlled', 'LazyLoadingWithSelection', 'DragAndDropUncontrolled', 'DragAndDropControlled', 'DragAndDropFlatData', 'DragAndDropFlatDataControlled', 'DragAndDropWithLazyLoading', 'DragAndDropWithLazyLoadingControlled', ]); const untestedStories = storyNames.filter(name => !testedStories.has(name)); expect(untestedStories).toEqual([]); }); it('renders Basic story', () => { const Story = composedStories.Basic; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`