import React from 'react';
import { composeStories } from '@storybook/react-vite';
import { render as testRender } from '../../../vitest/render';
import * as stories from './Field.stories';
const composedStories = composeStories(stories);
describe('Field Story Snapshots', () => {
it('has tests for all stories', () => {
const storyNames = Object.keys(composedStories);
const testedStories = new Set([
'Default',
'Required',
'WithHint',
'WithWarning',
'WithError',
'Disabled',
'ReadOnly',
'WithTooltip',
'FullWidth',
'Justified',
]);
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 Required story', () => {
const Story = composedStories.Required;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders WithHint story', () => {
const Story = composedStories.WithHint;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders WithWarning story', () => {
const Story = composedStories.WithWarning;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders WithError story', () => {
const Story = composedStories.WithError;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders Disabled story', () => {
const Story = composedStories.Disabled;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders ReadOnly story', () => {
const Story = composedStories.ReadOnly;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders WithTooltip story', () => {
const Story = composedStories.WithTooltip;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders FullWidth story', () => {
const Story = composedStories.FullWidth;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders Justified story', () => {
const Story = composedStories.Justified;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
});