import React from 'react';
import { composeStories } from '@storybook/react-vite';
import { render as testRender } from '../../../../vitest/render';
import * as stories from './NumberInput.stories';
const composedStories = composeStories(stories);
describe('NumberInput Story Snapshots', () => {
it('has tests for all stories', () => {
const storyNames = Object.keys(composedStories);
const testedStories = new Set([
'Default',
'WithDifferentLocale',
'WithDefaultValue',
'WithPlaceholder',
'PositiveNumber',
'NegativeNumber',
'ZeroValue',
'Error',
'Warning',
'Disabled',
'ReadOnly',
'Required',
'WithName',
'Composed',
]);
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 WithDifferentLocale story', () => {
const Story = composedStories.WithDifferentLocale;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
Current value:
null
Expected decimal separator for
cs-CZ
:
comma (,)
`);
});
it('renders WithDefaultValue story', () => {
const Story = composedStories.WithDefaultValue;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders WithPlaceholder story', () => {
const Story = composedStories.WithPlaceholder;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders PositiveNumber story', () => {
const Story = composedStories.PositiveNumber;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders NegativeNumber story', () => {
const Story = composedStories.NegativeNumber;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders ZeroValue story', () => {
const Story = composedStories.ZeroValue;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders Error story', () => {
const Story = composedStories.Error;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders Warning story', () => {
const Story = composedStories.Warning;
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 Required story', () => {
const Story = composedStories.Required;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders WithName story', () => {
const Story = composedStories.WithName;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders Composed story', () => {
const Story = composedStories.Composed;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
});