import React from 'react';
import { composeStories } from '@storybook/react-vite';
import { render as testRender } from '../../../../vitest/render';
import * as stories from './SingleSelect.stories';
const composedStories = composeStories(stories);
describe('SingleSelect Story Snapshots', () => {
it('has tests for all stories', () => {
const storyNames = Object.keys(composedStories);
const testedStories = new Set([
'Default',
'SearchMode',
'WithDefaultValue',
'Controlled',
'DisabledState',
'WithNullableOption',
'CheckedIndicatorEnd',
'NoCheckedIndicator',
'WithCustomValueRendering',
'WithGroupedOptions',
'EmptyOptions',
'WithDisabledOptions',
'SearchWithQuery',
'WithLargeDataset',
]);
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 SearchMode story', () => {
const Story = composedStories.SearchMode;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders WithDefaultValue story', () => {
const Story = composedStories.WithDefaultValue;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders Controlled story', () => {
const Story = composedStories.Controlled;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders DisabledState story', () => {
const Story = composedStories.DisabledState;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders WithNullableOption story', () => {
const Story = composedStories.WithNullableOption;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders CheckedIndicatorEnd story', () => {
const Story = composedStories.CheckedIndicatorEnd;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders NoCheckedIndicator story', () => {
const Story = composedStories.NoCheckedIndicator;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders WithCustomValueRendering story', () => {
const Story = composedStories.WithCustomValueRendering;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders WithGroupedOptions story', () => {
const Story = composedStories.WithGroupedOptions;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders EmptyOptions story', () => {
const Story = composedStories.EmptyOptions;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders WithDisabledOptions story', () => {
const Story = composedStories.WithDisabledOptions;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders SearchWithQuery story', () => {
const Story = composedStories.SearchWithQuery;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
Query:
| Selected:
none
`);
});
it('renders WithLargeDataset story', () => {
const Story = composedStories.WithLargeDataset;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
});