import React from 'react'; import { composeStories } from '@storybook/react-vite'; import { render as testRender } from '../../../../vitest/render'; import * as stories from './FileField.stories'; const composedStories = composeStories(stories); describe('FileField Story Snapshots', () => { it('has tests for all stories', () => { const storyNames = Object.keys(composedStories); const testedStories = new Set([ 'Default', 'Multiple', 'MaxFiles', 'Accept', 'Error', 'MultipleErrors', 'Tooltip', 'Justify', 'Medium', 'Large', 'Disabled', 'WithPreviewSrc', ]); 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 Multiple story', () => { const Story = composedStories.Multiple; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders MaxFiles story', () => { const Story = composedStories.MaxFiles; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders Accept story', () => { const Story = composedStories.Accept; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders Error story', () => { const Story = composedStories.Error; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders MultipleErrors story', () => { const Story = composedStories.MultipleErrors; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders Tooltip story', () => { const Story = composedStories.Tooltip; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders Justify story', () => { const Story = composedStories.Justify; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders Medium story', () => { const Story = composedStories.Medium; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders Large story', () => { const Story = composedStories.Large; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders Disabled story', () => { const Story = composedStories.Disabled; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders WithPreviewSrc story', () => { const Story = composedStories.WithPreviewSrc; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); });