import React from 'react';
import { composeStories } from '@storybook/react-vite';
import { render as testRender } from '../../../vitest/render';
import * as stories from './Button.stories';
const composedStories = composeStories(stories);
describe('Button Story Snapshots', () => {
it('has tests for all stories', () => {
const storyNames = Object.keys(composedStories);
const testedStories = new Set([
'Default',
'Disabled',
'Loading',
'Primary',
'Secondary',
'Action',
'Destructive',
'Small',
'Medium',
'Large',
'IconLeft',
'IconRight',
'IconBoth',
'IconLeftMedium',
'IconRightMedium',
'IconBothMedium',
'IconBothLarge',
]);
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 Disabled story', () => {
const Story = composedStories.Disabled;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders Loading story', () => {
const Story = composedStories.Loading;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders Primary story', () => {
const Story = composedStories.Primary;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders Secondary story', () => {
const Story = composedStories.Secondary;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders Action story', () => {
const Story = composedStories.Action;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders Destructive story', () => {
const Story = composedStories.Destructive;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders Small story', () => {
const Story = composedStories.Small;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders Medium story', () => {
const Story = composedStories.Medium;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders Large story', () => {
const Story = composedStories.Large;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders IconLeft story', () => {
const Story = composedStories.IconLeft;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders IconRight story', () => {
const Story = composedStories.IconRight;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders IconBoth story', () => {
const Story = composedStories.IconBoth;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders IconLeftMedium story', () => {
const Story = composedStories.IconLeftMedium;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders IconRightMedium story', () => {
const Story = composedStories.IconRightMedium;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders IconBothMedium story', () => {
const Story = composedStories.IconBothMedium;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
it('renders IconBothLarge story', () => {
const Story = composedStories.IconBothLarge;
const { container } = testRender();
expect(container).toMatchInlineSnapshot(`
`);
});
});