import React from 'react'; import { composeStories } from '@storybook/react-vite'; import { render as testRender } from '../../../vitest/render'; import * as stories from './Modal.stories'; const composedStories = composeStories(stories); describe('Modal Story Snapshots', () => { it('has tests for all stories', () => { const storyNames = Object.keys(composedStories); const testedStories = new Set([ 'Default', 'WithFixedMaxWidth', 'WithoutFooter', 'WithoutTitle', 'Notification', 'WithError', 'WithAlert', 'WithSuccess', 'WithNotice', ]); 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 WithFixedMaxWidth story', () => { const Story = composedStories.WithFixedMaxWidth; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders WithoutFooter story', () => { const Story = composedStories.WithoutFooter; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders WithoutTitle story', () => { const Story = composedStories.WithoutTitle; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders Notification story', () => { const Story = composedStories.Notification; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders WithError story', () => { const Story = composedStories.WithError; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders WithAlert story', () => { const Story = composedStories.WithAlert; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders WithSuccess story', () => { const Story = composedStories.WithSuccess; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); it('renders WithNotice story', () => { const Story = composedStories.WithNotice; const { container } = testRender(); expect(container).toMatchInlineSnapshot(`
`); }); });