import React from 'react'; import { composeStories } from '@storybook/react-vite'; import { render as testRender } from '../../../../vitest/render'; import * as stories from './SingleSelectField.stories'; const composedStories = composeStories(stories); describe('SingleSelectField Story Snapshots', () => { it('has tests for all stories', () => { const storyNames = Object.keys(composedStories); const testedStories = new Set([ 'Default', 'Uncontrolled', 'UncontrolledEmptyOptions', 'WithoutIcon', 'SimpleFruitsSelect', 'SimpleSelect', 'NestedSelect', 'ValueNumber', 'ControlledValueNumber', 'ValueStringUnion', 'NullableOption', ]); 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 Uncontrolled story', () => { const Story = composedStories.Uncontrolled; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders UncontrolledEmptyOptions story', () => { const Story = composedStories.UncontrolledEmptyOptions; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders WithoutIcon story', () => { const Story = composedStories.WithoutIcon; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders SimpleFruitsSelect story', () => { const Story = composedStories.SimpleFruitsSelect; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders SimpleSelect story', () => { const Story = composedStories.SimpleSelect; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders NestedSelect story', () => { const Story = composedStories.NestedSelect; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders ValueNumber story', () => { const Story = composedStories.ValueNumber; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders ControlledValueNumber story', () => { const Story = composedStories.ControlledValueNumber; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders ValueStringUnion story', () => { const Story = composedStories.ValueStringUnion; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders NullableOption story', () => { const Story = composedStories.NullableOption; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); });