import React from 'react';
import { composeStories } from '@storybook/react-vite';
import { render as testRender } from '../../../../vitest/render';
import * as stories from './TextInput.stories';
const composedStories = composeStories(stories);
describe('TextInput Story Snapshots', () => {
it('has tests for all stories', () => {
const storyNames = Object.keys(composedStories);
const testedStories = new Set([
'Default',
'WithDefaultValue',
'ErrorState',
'WarningState',
'DisabledState',
'ReadOnlyState',
]);
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 WithDefaultValue story', () => {
const Story = composedStories.WithDefaultValue;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders ErrorState story', () => {
const Story = composedStories.ErrorState;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders WarningState story', () => {
const Story = composedStories.WarningState;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders DisabledState story', () => {
const Story = composedStories.DisabledState;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders ReadOnlyState story', () => {
const Story = composedStories.ReadOnlyState;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
});