import React from 'react'; import { composeStories } from '@storybook/react-vite'; import { render as testRender } from '../../../vitest/render'; import * as stories from './Popover.stories'; const composedStories = composeStories(stories); describe('Popover Story Snapshots', () => { it('has tests for all stories', () => { const storyNames = Object.keys(composedStories); const testedStories = new Set([ 'Default', 'WithPadding', 'Elevation', 'TopPlacement', 'WithInteractiveContent', 'ControlledAndOpenByDefault', ]); const untestedStories = storyNames.filter(name => !testedStories.has(name)); expect(untestedStories).toEqual([]); }); it('renders Default story', () => { const Story = composedStories.Default; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders WithPadding story', () => { const Story = composedStories.WithPadding; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders Elevation story', () => { const Story = composedStories.Elevation; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders TopPlacement story', () => { const Story = composedStories.TopPlacement; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders WithInteractiveContent story', () => { const Story = composedStories.WithInteractiveContent; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders ControlledAndOpenByDefault story', () => { const Story = composedStories.ControlledAndOpenByDefault; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); });