import React from 'react';
import { composeStories } from '@storybook/react-vite';
import { render as testRender } from '../../../vitest/render';
import * as stories from './SegmentedControl.stories';
const composedStories = composeStories(stories);
describe('SegmentedControl Story Snapshots', () => {
it('has tests for all stories', () => {
const storyNames = Object.keys(composedStories);
const testedStories = new Set([
'Default',
'Sizes',
'TextOnly',
'IconText',
'IconOnly',
'WithSuffix',
'DisabledOption',
'DisabledGroup',
'Uncontrolled',
'CustomRenderOption',
'PeriodSelector',
'ViewToggle',
]);
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 Sizes story', () => {
const Story = composedStories.Sizes;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders TextOnly story', () => {
const Story = composedStories.TextOnly;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders IconText story', () => {
const Story = composedStories.IconText;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders IconOnly story', () => {
const Story = composedStories.IconOnly;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
Note: not available in :sm — icons would not meet 24×24 spec inside a 22 px segment.
`);
});
it('renders WithSuffix story', () => {
const Story = composedStories.WithSuffix;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders DisabledOption story', () => {
const Story = composedStories.DisabledOption;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders DisabledGroup story', () => {
const Story = composedStories.DisabledGroup;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders Uncontrolled story', () => {
const Story = composedStories.Uncontrolled;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders CustomRenderOption story', () => {
const Story = composedStories.CustomRenderOption;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders PeriodSelector story', () => {
const Story = composedStories.PeriodSelector;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders ViewToggle story', () => {
const Story = composedStories.ViewToggle;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
});